vishaalagartha / basketball_reference_scraper

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

Issue retrieving any player information about Shaquille O'Neal #97

Open Taidgh-Robinson opened 1 year ago

Taidgh-Robinson commented 1 year ago

When running get_stats("Shaquille O'Neal", stat_type='ADVANCED', playoffs=False, career=False) I get this output:

`You searched for "Shaquille O'Neal" 1 result found. Shaquille O'Neal Results for Shaquille O'Neal:

Traceback (most recent call last): File "", line 1, in File "C:\Users\taidg\OneDrive\Desktop\Python\basketball_reference_scraper\basketball_reference_scraper\players.py", line 14, in get_stats suffix = get_player_suffix(name) File "C:\Users\taidg\OneDrive\Desktop\Python\basketball_reference_scraper\basketball_reference_scraper\utils.py", line 67, in get_player_suffix initial = last_name_part[0].lower() IndexError: string index out of range`

I have also tried name = 'Shaquille ONeal' and I get the same result. I think the issue is with his name having an apostrophe in it.