这是我尝试过的:
import requests
website_url = "https://en.wikipedia.org/wiki/List_of_Texas_Rangers_seasons"
url = requests.get(website_url).text
from bs4 import BeautifulSoup
soup = BeautifulSoup(website_url,'html.parser')
# Selecting the table
table_classes = {"class":"wikitable plainrowheaders"}
rel_table = soup.find_all('table',table_classes)
我不确定如何继续进行。我确实检查了元素,看来标题和href都是动态的,其中包含年份字段。同样,它也包含华盛顿参议员的表格。我将不胜感激!谢谢!
答案 0 :(得分:0)
-587904464
-587904464
12
8
8
8