python 正在抓取以提取评论数
python crawling to extract review count
我尝试使用 python
制作评论计数爬虫
productURL_path = []
for tag in bsObj.findAll(attrs={'class': 'thumb'}):
if "href" in tag.attrs:
productURL_path.append(tag.get('href'))
for reviewcnt in bsObj.findAll(attrs={'class': 'product-reviews-count'})
但我无法获得标签 enter image description here
之间的评论数 323
有什么想法吗?
实际上因为我不是开发人员,所以这个问题有点棘手
如果您需要更多信息来解决这个问题,请发表评论。
也许试试这个?我不太确定你到底想做什么(这是未经测试的)
for reviewcnt in bsObj.findAll(attrs={'class': 'product-reviews-count'}):
print(reviewcnt.find("b").text) # 323
我尝试使用 python
制作评论计数爬虫productURL_path = []
for tag in bsObj.findAll(attrs={'class': 'thumb'}):
if "href" in tag.attrs:
productURL_path.append(tag.get('href'))
for reviewcnt in bsObj.findAll(attrs={'class': 'product-reviews-count'})
但我无法获得标签 enter image description here
之间的评论数 323有什么想法吗?
实际上因为我不是开发人员,所以这个问题有点棘手
如果您需要更多信息来解决这个问题,请发表评论。
也许试试这个?我不太确定你到底想做什么(这是未经测试的)
for reviewcnt in bsObj.findAll(attrs={'class': 'product-reviews-count'}):
print(reviewcnt.find("b").text) # 323