我是python的新手,只有几个小时的经验。我一直在创建一个脚本,直接为我的国家抓取空气质量读数。我正在尝试在我的脚本中运行以下命令: psi = soup.find("div", {"class": "panel-stats-value-content"}).text 不过,当我运行它时,它的响应是: AttributeError: 'NoneType' object has no att
我正在运行YouTube教程中的以下代码,但是当我想从类.totalcount中获取文本时,我得到了NoneType Object has no attribute "text"错误。事实上,在教程视频中,它是有效的。有什么帮助吗?如果在细节上,那将是很棒的。提前谢谢。url = "https://newyork.craigslist.org/"soup = Beau
我正在用漂亮的汤做python抓取,我正在爬行的网站有一个包含标题、链接和文本的28个容器,文本在<p>标签中,我的问题是我可以抓取所有的数据,但是有些<p>标记没有文本,所以我收到一个错误"AttributeError: 'NoneType' object has no attribute 'text'" --我的
我正在使用一个程序从OpenVAS (别人的代码)中解析xml文件,并且我得到了AttributeError: 'NoneType' object has no attribute 'text'。/host/hostname").text
AttributeError: 'NoneType' object has no attribute 'text' 以下是parser.py文