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
检查一下,如果你需要任何帮助,请不要犹豫,问问 –