html - 如何读取未反映在美丽汤对象中的 html 标签
问题描述
我正在尝试为我的业余项目抓取动漫电视连续剧的页面,并遇到了这个我无法提取完整 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 输出。请让我知道可以做些什么。
解决方案
推荐阅读
- javascript - React JS - 如何实时更新 Firestore 值
- c# - 翻译插值字符串语句
- python-3.x - Pandas formated Datetime Column - Filter results by a specific Day of Week
- visual-studio-code - 有没有办法仅在打开特定文件类型时启用键盘快捷键
- vue.js - 将 Vue 3.1 升级到 3.2
- git - gnutls 握手()失败:拉函数中的错误。git 克隆
- go - Golang Antlr 找不到解析器的路径
- android - 视图绑定在 Button setOnClickListner 上不起作用... [*ERROR = Variable 'getOTPButton' is never used] (KOTLIN)
- c# - Blazor WASM 是否可以有多个服务器项目
- python - Python Panda Dataframe 计算列表中的特定值