#
x20=x.find_all('table',class_='pl_table_data');
clst=lst4objs_txt(x20,['\n','\t','%'])
ds=fb_gid_getExt_oz4clst(ds,clst)
#
df_2ds8xlst(bars,ds,xlst)
df=df.append(ds.T,ignore_index=True)
#--footer
if xc>0:
x10=bs.find_all('tr',xls='footer')
for xc,x in enumerate(x10):
#print('\n@x\n',xc,'#',x.attrs)
if xc<3:
x20=x.find_all('table',class_='pl_table_data');
clst=lst4objs_txt(x20,['\n','\t','%'])
ds['gid']=gid
if xc==0:ds['cid'],ds['cname']='90005','gavg'
if xc==1:ds['cid'],ds['cname']='90009','gmax'
if xc==2:ds['cid'],ds['cname']='90001','gmin'
#
df_2ds8xlst(bars,ds,xlst)
ds=fb_gid_getExt_oz4clst(ds,clst)
#
df=df.append(ds.T,ignore_index=True)
#
if ftg!='':df.to_csv(ftg,index=False,encoding='gb18030')
#
return df
#-----------------------
gid = '581438'
bars = gids.loc[0]
uss = '/fenxi/ouzhi-'+gid+'.shtml'
rx= requests.get(uss)
htm = rx.text
if len(htm)>5000:
xdats=fb_gid_getExt_oz4htm(htm,bars)
#-----------------------
爬取足彩单场比赛赔率数据的python代码(2):http://www.chuibin.com/fanwen/lunwen_205550.html