學(xué)慕課照著老師敲的代碼問題百出
raceback (most recent call last):
? File "E:\新建文件夾\Java\imooc\test\test_bs4.py", line 27, in <module>
? ? print ((link_node).name,link_node['href'],link_node.get_text())
AttributeError: 'NoneType' object has no attribute 'name'
raceback (most recent call last):
? File "E:\新建文件夾\Java\imooc\test\test_bs4.py", line 27, in <module>
? ? print ((link_node).name,link_node['href'],link_node.get_text())
AttributeError: 'NoneType' object has no attribute 'name'
2018-05-21
舉報
2018-10-05
請問解決了么? 我也是Python3 ?最后報錯“'NoneType' object is not callable
2018-09-14
python3中可以試試把最后一句代碼改為:
print(link.name,link['href'],link.get_test)
2018-05-23
print(link_node.name, link_node['href'], link_node.get_text())#不用多打括弧