各位大大好
請問以下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')