我正在尝试为我的业余项目抓取动漫电视连续剧的页面,并遇到了这个我无法提取完整 div 标签的小问题。
链接:https ://gogoanime.in/category/boruto-naruto-next-generations
我想在这里刮掉这个东西:在此处 输入图像描述
我正在使用的代码是这样的:
from bs4 import BeautifulSoup
trialURL = 'https://gogoanime.in/category/boruto-naruto-next-generations'
#completeAnimeList_df.URL[0]
page = simple_get(trialURL)
soup = BeautifulSoup(page,'html.parser')
#working on number of comments
divComment = soup.find('span', attrs={"class" : "comment-count"})
print(divComment.get_text)
运行代码后,我得到了 NoneType 输出。请让我知道可以做些什么。