作者sariel0322 (sariel)
看板Python
标题[问题] python抓网页资料问题
时间Tue Dec 23 21:40:26 2014
不好意思又来发问,而且这次不知道算不算纯python问题
想请问一下,我用beautifulsoup来抓取网页资料
想要抓的是这个网页按下"perform"的资料
原本的网址:
http://web.expasy.org/cgi-bin/peptide_mass/peptide-mass.pl?P35225
按下後会跑出这一类的资料
http://ppt.cc/xTj1
但是这些资料的网址却变成:
http://web.expasy.org/cgi-bin/peptide_mass/peptide-mass.pl
用beautifulsoup抓的时候就变成错误了,用这网址当然也不能用
想请问一下,我该怎麽抓附图的资料
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 120.126.36.171
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Python/M.1419342031.A.27C.html
1F:推 Seudo: requests.post(url,data={'protein':'P35225'}).text 12/23 23:28
3F:→ Thisisnotptt: 你试试看行不行,有用到mechanize套件 12/23 23:56
4F:→ Thisisnotptt: 送出相对应的POST他就会给你对的资料了 12/23 23:58
5F:→ sariel0322: 好像不行...一楼可以读,但是重要的table的资料出不来 12/30 23:36
6F:推 Seudo: form都填完就会有table资料了 12/31 17:49