【发布时间】:2018-06-04 09:04:08
【问题描述】:
我使用 python 进行网页抓取,从网站获取此代码:
<a href="javascript:document.frmMain.action.value='display_physician_info';document.frmMain.PhysicianID.value=1234567;document.frmMain.submit();" title="For more information, click here.">JOHN, DOE</a>
我想解析 href 的具体值,例如 "document.frmMain.PhysicianID.value" 中的 PhysicianID 的值 1234567 >
目前我得到的整个 href 文本是这样的:
for i in soup.select('.data'):
name = i.find('a', attrs = {'title': 'For more information, click here.'})
有什么想法吗?提前致谢。
【问题讨论】:
标签: python web-scraping html-parsing