我正在尝试使用pythonbs4从我之前成功登录(使用请求)的网站提取带有特定锚文本的a href。在
以下是登录页的伪HTML:
some thead
uninterestingtextuninterestingtextuninterestinguninteresting textuninterestinguninteresting textuninteresting textuninterestingtext现在,我试图通过查找a标记之间的上传…文本来提取兴趣链接。在
以下是我尝试的:
^{pr2}$
但这总是犯错误AttributeError: 'NoneType' object has no attribute 'get'
因为“重要页面”总是“无”。在
注意:我已经确定“responseFromSuccessfulLogin.text”是正确的HTML,其中包含所需的链接。在
在阅读了其他关于类似问题的论坛帖子之后,我修改了这行代码,使用方法'select'来查询css选择器以及'findAll'方法,但是没有成功。在
我觉得我搞砸了,因为这是一张桌子,链接在里面。在