我的腳本寫在下面,並且找到soup.get_text()
命令的錯誤。 代碼:BeautifulSoup:解析HTML文件時無類型錯誤
from BeautifulSoup import *
soup=BeautifulSoup(open("F:\\HTML\\Registrationform.html"))
print soup.get_text('+')
錯誤:文件 「C:/Python27/beautifulsoup4-4.6.0.tar/scrapingbasic.py
」,3號線,在
print soup.get_text('+')
TypeError: 'NoneType' object is not callable
更新爲[beautifulsoup4](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) – SmartManoj