def web_get001txtFg(uss,fss): fsiz=zt.f_size(fss) if zsys.web_get001txtFg or(fsiz<1000): #print(zsys.sgnSP8,fss,fsiz) #uss=xtfb.us0_extOuzhi+xtfb.kgid+'.shtml';#print(uss) htm=web_get001txt(uss,ftg=fss,fcod='GB18030');#print(fss) else: htm=zt.f_rd(fss,cod='GB18030') # return htm
df = df.append(ds.T, ignore_index=True) if ftg != '': df.to_csv(ftg, index=False, encoding='gb18030') # return df #----------------------- #1 gid = '668003' fgid = '/tfbDat/gid2018.dat' gids = pd.read_csv(fgid, index_col=False, dtype=str, encoding='gb18030') #2 g10 = gids[gids['gid'] == gid] bars = pd.Series(list(g10.values[0]), index=list(g10)) print('\n#2') print(bars) print('\ntype(g10),', type(g10)) #3 fhtm, ftg = 'dat/' + gid + '_tz.htm', 'tmp/' + gid + '_tz.dat' htm = zt.f_rd(fhtm) df = fb_gid_getExt_tz4htm(htm, bars, ftg) print('\n#3') print(df.tail()) #----------------------- print('\nok!')