V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  explist  ›  全部回复第 4 页 / 共 4 页
回复总数  65
1  2  3  4  
2015-09-06 23:08:35 +08:00
回复了 explist 创建的主题 Python 如何用 python 抓取银行各年利率(动态的)?
出于学习目的问一下:
建设银行的这个网站: http://www.ccb.com/cn/personal/interest/rmbdeposit.html 如何爬取,源代码中并无 table 标签
2015-09-05 22:12:52 +08:00
回复了 explist 创建的主题 Python 如何用 python 抓取银行各年利率(动态的)?
@Shy07 这下对了,你怎么知道她们间的对应关系的
2015-09-05 21:42:58 +08:00
回复了 explist 创建的主题 Python 如何用 python 抓取银行各年利率(动态的)?
有了时间列表后,如何构造 POST 请求?
2015-09-05 19:54:57 +08:00
回复了 explist 创建的主题 Python 如何用 python 抓取银行各年利率(动态的)?
def ghtest ():
url = r'http://www.icbc.com.cn/ICBCDynamicSite2/other/rmbdeposit.aspx'
req = request.Request (url )

req.add_header ("User-Agent",'')
g=ghHtml () # HTMLParser
with request.urlopen (req ) as f:
g.feed (f.read ().decode ())
dataDict={}
for item in g.dates:
dataDict['id'] = item
log=parse.urlencode (dataDict ).encode ('utf-8')
f = request.urlopen (url,log )
# dosoming
f.close ()
2015-09-05 19:52:18 +08:00
回复了 explist 创建的主题 Python 如何用 python 抓取银行各年利率(动态的)?
Network 标签看不了,或许因为这是银行网站
onchange 看见了,但是...但是我根本解读不了它(对 HTML 知之甚少)
1  2  3  4  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1196 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 23:25 · PVG 07:25 · LAX 16:25 · JFK 19:25
Developed with CodeLauncher
♥ Do have faith in what you're doing.