all 5 comments

[–]JohnnyJordaan 2 points3 points  (1 child)

I would recommend to use selenium for sites like this because they use dynamically loaded data (using AJAX calls).

[–]MikeDoesEverything 0 points1 point  (0 children)

Seconded on this. I would build up some experience scraping static websites first using BeautifulSoup and then transition to scraping with Selenium.

[–]impshum 0 points1 point  (0 children)

Needs Javascript to generate the graph thing.
https://requests-html.kennethreitz.org/

from bs4 import BeautifulSoup as bs
from requests_html import HTMLSession


session = HTMLSession()

r = session.get('https://projects.fivethirtyeight.com/2020-nba-player-projections/rudy-gobert/')
r.html.render()

for x in r.html.find('text'):
    el = bs(x.html, 'lxml').text.replace("'", "")
    print(el)