我正在从IMDB提取评论数据。你知道吗
然而,有时也有没有排名的数据。你知道吗
对于这样的数据,我想将Rank视为0,并将其添加到数组中。你知道吗
我不知道怎么做。你知道吗
你能帮我吗?你知道吗
非常感谢!你知道吗
这样提取时,秩值较低。你知道吗
for star in soup.select('span:has(~ .point-scale)'):
Star.append(star.text.strip());
for title in soup.find_all('a', {'class' : 'title'}):
Title.append(title.text.strip())
for content in soup.find_all(True,{'class' :[text show-more__control'
,'text show-more__control clickable]}):
Content.append(content.text.strip())
print(range(len(Content)))
不是所有的评论都会有评分,所以你需要考虑到这一点:
测试.py
相关问题 更多 >
编程相关推荐