几周前我正在抓取这个网站,但一些代码不再有效。此代码按预期返回所有内容:from bs4 import BeautifulSoupimport requestsurl = 'https://www.sportsbookreview.com/betting-odds/nfl-football/consensus/'res = requests.get(url)soup = BeautifulSoup(res.content, "lxml")soup.find_all('div', {'class': 'hUMQK _3JPYB'})但是,当在下面的代码上执行 find all 时,它现在返回一个空列表并且它曾经可以工作。网页 HTML 中似乎没有任何变化soup.find_all('div', {'class': '_3h0tU'})
添加回答
举报
0/150
提交
取消