Dan*_*l P 1 beautifulsoup python-3.x
我对 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)
| 归档时间: |
|
| 查看次数: |
2856 次 |
| 最近记录: |