[英]Python BeautifulSoup: parsing multiple tables with same class name
[英]Python BeautifulSoup: parsing multiple tables with same table is
tb
只是一個包含所有表的列表,您可以通過索引獲取表。我認為您的目標表的索引為 4。
tb = soup.findAll('table',{'id': 'btable'})
table_str = str(tb[4]) #select only one table by its index
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.