擅长:python、mysql、java
<p>您可以使用Selenium呈现页面,然后拉出html:</p>
<pre><code>from selenium import webdriver
from bs4 import BeautifulSoup
url = "https://www.basketball-reference.com/players/j/jamesle01.html"
driver = webdriver.Chrome()
driver.get(url)
html = driver.page_source
soup = BeautifulSoup(html,"html.parser")
data = soup.find_all("table",{"class":"row_summable sortable stats_table now_sortable"})
print(data)
</code></pre>