0
我試圖使用beautifulsoup在以下鏈接表來分析數據屬性,beautifulsoup分析表在Python
http://hk.warrants.com/home/en/sgdata/list_e.cgi#topsearch
由於該表中沒有階級屬性或ID ,我無法使用soup.find(「table」,{「title」:「TheTitle」})的常規方法來查找表格。相反,我已經盡力了,
warrantUrl = 'http://hk.warrants.com/home/en/sgdata/list_e.cgi#topsearch'
warrantPage = urlopen(warrantUrl)
soup = BeautifulSoup(warrantPage, 'html.parser')
table = soup.find_all("tr")
paragraphs = []
for x in table:
paragraphs.append(str(x))
另外,我想在這個崗位, Parse table with BeautifulSoup Python提到的方法。但沒有成功...
謝謝你,會研究那一個。 – ppp5000
檢查一下,如果你需要任何幫助,請不要猶豫,問問 –