Open windowshopr opened 1 week ago
Confirmed this fails with an error running the following code. Note the CHA/ at the start of the boxscore link, which I found in the code comments as well.
Without the leading CHA/, the package fails to find any boxscore and just returns silently. With the leading CHA/, there is an unrecoverable error in parsing the boxscore HTML.
from sportsipy.mlb.boxscore import Boxscore
# Get a Pandas DataFrame of all stats for a MLB game
game = Boxscore('CHA/CHA202406090')
df = game.dataframe
print(df)
Seems like at least the header section the package uses to get the team info changed from a table to a collection of divs, so the code will need to be re-worked, probably pretty extensively.
Output:
URL testing: https://www.baseball-reference.com/boxes/CHA/CHA202406090.shtml