1.获取子标签: thr_msgs = soup.find_all('div',class_=re.compile('msg')) for i in thr_msgs: print(i) first = i.select('em:nth-of-type(1)') print(first) >>> <div class='\"msg\"'><em>佛山</em><em>1-3年&
//获取一个文件夹下的所有文件 //不包括文件夹里面的文件 //ListBox1.Items:= searchfile('Z:\'); //注意,path后面要有'\'; function Searchfile(path:string):TStringList; var SearchRec:TSearchRec; found:integer; begin Result:=TStringList.Create; found:=FindFirst(path+'*.*',f