vishaalagartha / basketball_reference_scraper

A python module for scraping static and dynamic content from Basketball Reference.
MIT License
254 stars 91 forks source link

get_game_logs no longer works because of sports-reference dependency #102

Closed tgracin closed 7 months ago

tgracin commented 1 year ago

function get_game_logs queries r = get(f'https://widgets.sports-reference.com/wg.fcgi?css=1&site=bbr&url={suffix}%2Fgamelog%2F{year}%2F&div={selector}'), but that widget is no longer supported. Here is a response (which has status_code 200, so the rest of the function believes it should be parsable):

b'document.write(\'<div class="sr_widget" style="overflow-x:auto">\');\ndocument.write(\'<p><strong>NOTE:</strong> <a href="https://www.sports-reference.com/blog/2022/10/sports-reference-will-turn-off-our-widgets-service-january-1-2023/">Sports Reference has turned off our widgets service effective January 1, 2023</a></p>\');\ndocument.write(\'</div>\');\n'

The data should be fetched from somewhere else.

josh-bone commented 1 year ago

For reference: https://www.sports-reference.com/blog/2022/10/sports-reference-will-turn-off-our-widgets-service-january-1-2023/

vishaalagartha commented 7 months ago

This issue should be resolved with the new version