※ 引述《TimJack (饱喀喀)》之铭言:
: 各位大大好
: 请问以下code:
: from urllib.request import urlopen
: from bs4 import BeautifulSoup
: html_doc ='http://www.twse.com.tw/fund/BFI82U'
: soup = BeautifulSoup(html_doc,'html.parser')
: for i in soup.body.tbody.find_all('tr'):
: print(i.td.get_text())
: 打印如下错误:
: AttributeError Traceback (most recent call last)
: <ipython-input-22-f987a99b5e34> in <module>()
: 4 soup = BeautifulSoup(html_doc,'html.parser')
: