oseymour / ScraperFC

Python package for scraping soccer data from a variety of sources
GNU General Public License v3.0
222 stars 49 forks source link

Cancelled Match Cause Issue while Trying to Scrape All Matches of the Year #10

Closed hedonistrh closed 1 year ago

hedonistrh commented 1 year ago

Hey @oseymour, sorry about creating many issues. I hope that is fine for you. 🙏

I realized issue with https://fbref.com/en/matches/b3f1bb11/Sporting-KC-Minnesota-United-November-1-2020-Major-League-Soccer. That match is cancelled so if one would like to try to scrape all matches in 2020 MLS Season, that brings issue. 😿 I am not sure does that make any sense to add check for that as match cancellation is less likely. (Possibly that happened in the Covid time with some leagues though).

If you would like to reproduce the issue

import ScraperFC as sfc
scraper_fbref = sfc.FBRef()
single_match_url = "https://fbref.com/en/matches/b3f1bb11/Sporting-KC-Minnesota-United-November-1-2020-Major-League-Soccer"
year = 2020
league_name = "MLS"
fbref_match_data = scraper_fbref.scrape_match(link=single_match_url, year=year, league=league_name)
oseymour commented 1 year ago

Hey @hedonistrh! This bug should also be fixed in 2.1.4. Let me know if it isn't! Thanks!

hedonistrh commented 1 year ago

Hey @oseymour, thanks a lot. Following is working without any issue. So, I am closing this issue as well.

import ScraperFC as sfc
scraper_fbref = sfc.FBRef()
single_match_url = "https://fbref.com/en/matches/b3f1bb11/Sporting-KC-Minnesota-United-November-1-2020-Major-League-Soccer"
year = 2020
league_name = "MLS"
fbref_match_data = scraper_fbref.scrape_match(link=single_match_url)