我仍然是python的初学者,我想抓一个网站,我希望Python搜索一个值直到它可见,因此重试直到值可用而不是给出错误' AttributeError: '结果集'对象没有属性' get'如果没有找到值。这是我现在的代码:
resumeURL='url'
response=self.session.get(resumeURL,headers=headers)
soup=BeautifulSoup(response.content, "html.parser")
form=soup.find_all('input',{'name':'form_id', 'type':'hidden'})
for form in form:
print(form.get('value'))
答案 0 :(得分:0)
您必须呈现动态内容。
选项: