我试图从这个website获取内容;为此,我编写了以下代码:
source = requests.get(justwatch+pelicula,headers=headers)
source_content = source.content
soup2 = BeautifulSoup(source_content,'html.parser')
soup2.find_all('div', class_='price-comparison__grid__row__element')
但是,由于find_all()
函数和find()
函数都没有返回任何结果,因此我什么也没有得到
我错过了什么
站点动态加载数据。从它的api和该站点的html中不包含带有
class='price-comparison__grid__row__element'
的<div>
标记。这就是为什么你会得到None
。尝试python模块JustWatch运行:
pip install justwatch
相关问题 更多 >
编程相关推荐