I am trying to web scrape https://understat.com/league/EPL and scrape the table on the page with the list of teams and the data related to each, but it has not worked and I get an error 'NoneType' object is callable.
This is the code I tried (I am new to this and would appreciate your help):
from bs4 import beautifulsoup
import requests
import pandas as pd
result = requests.get ("https://understat.com/league/EPL")
src = result.content
soup = BeautifulSoup(src, 'html.parser')
columns = ("No", "Team", "M", "W", "D", "L", "G", "GA", "Pts", "xG", "xGA", "xPts")
df = pd.DataFrame(columns=columns)
for row in soup ("table", {"class":"calendar-container}).find_all("tr"):
tds=row.find_all("td")
row=(td.text.replace("\n", "") for td in tds)
df = df.append(pd.Series(row, index=columns), ignore_index=True