【发布时间】:2020-03-05 08:39:29
【问题描述】:
Here is the website I am to scrape the number of reviews
所以在这里我想提取数字 272 但它每次都返回 None 。 我必须使用 BeautifulSoup。 我试过了-
sources = requests.get('https://www.thebodyshop.com/en-us/body/body-butter/olive-body-butter/p/p000016')
soup = BeautifulSoup(sources.content, 'lxml')
x = soup.find('div', {'class': 'columns five product-info'}).find('div')
print(x)
输出 - 空标签
我想进一步进入该标签。
【问题讨论】:
-
为什么这么多人认为这个词是“scrap”而不是“scrape”?
-
HTML 中的
class="column five product-info"在哪里? -
$0和这个有什么关系? -
@Barmar 我更正了拼写,谢谢。请再次检查我的链接。
-
图片应该是HTML的相关部分。
标签: python html dom web-scraping beautifulsoup