I have followed a video and an article(while trying to learn BS4). Both scrape similarly and I keep getting this error either way:
headers = [th.getText() for th in soup.findAll('tr', limit=2)[0].findALl('th')] TypeError: 'NoneType' object is not callable
from bs4 import BeautifulSoup
from urllib.request import urlopen
import pandas as pd
url = "https://www.basketball-reference.com/leagues/NBA_2022_per_game.html"
html = urlopen(url)
soup = BeautifulSoup(html, features="lxml")
headers = [th.getText() for th in soup.findAll('tr', limit=2)[0].findALl('th')]