小编Dan*_*l P的帖子

BeautifulSoup findall() 中的“NoneType”对象不可调用

我对 Python 的奇妙世界很陌生。下面的刮板产生一个对象不可调用错误,我真的不明白为什么会这样。非常感谢任何帮助

from urllib.request import urlopen
from bs4 import BeautifulSoup
html = urlopen("https://www.maxxim.de/lte-mini-sms1?maxxim=7hs6q1jfl95fip6qumcum4rfh4")
bsObj = BeautifulSoup(html,"html.parser")
nameList = bsObj.findall("h2")
for name in nameList:
     print (name.get_text())
Run Code Online (Sandbox Code Playgroud)

beautifulsoup python-3.x

1
推荐指数
1
解决办法
2856
查看次数

标签 统计

beautifulsoup ×1

python-3.x ×1