I am trying to get data from the table with id=’stats_standard’ using the BeautifulSoup and requests libraries, but I have tried various methods like using find and select, and I still receive None or []. Does anyone have a solution?
import requests
from bs4 import BeautifulSoup
url = 'https://fbref.com/en/comps/9/2023-2024/stats/2023-2024-Premier-League-Stats'
page = requests.get(url)
soup = BeautifulSoup(page.text, 'html.parser')
table = soup.find('table', id='stats_standard')
print(table) # None
i want to get data from the table
New contributor
i love whisky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.