probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.
https://soccerdata.readthedocs.io/en/latest/
Other
511 stars 87 forks source link

[WhoScored] Broken read_schedule() method #581

Closed probberechts closed 1 month ago

probberechts commented 1 month ago

WhoScored has updated the HTML structure of their fixture pages. The scraper must be updated accordingly.

ds-oliver commented 1 month ago

Hey - are we getting WS scraper back up?

probberechts commented 1 month ago

I am working on it. You can already use the version in the fix/whoscored-schedule branch. I need to do a bit more testing before releasing it.

ds-oliver commented 1 month ago

I am working on it. You can already use the version in the fix/whoscored-schedule branch. I need to do a bit more testing before releasing it.

I'll check that out. Cheers.

ds-oliver commented 1 month ago

I am working on it. You can already use the version in the fix/whoscored-schedule branch. I need to do a bit more testing before releasing it.

I tried to follow your advice with this and have encountered an issue while trying to check out and install the fix/whoscored-schedule branch. Here are the steps I followed and the errors I encountered:

  1. Cloned the repository:

    git clone https://github.com/probberechts/soccerdata.git soccerdata_whoscored_schedule
    cd soccerdata_whoscored_schedule
  2. Checked out the specific branch:

    git fetch --all
    git checkout fix/whoscored-schedule
  3. Created and activated a virtual environment:

    python -m venv venv
    source venv/bin/activate
  4. Upgraded pip, setuptools, and wheel:

    pip install --upgrade pip setuptools wheel
  5. Attempted to install the package in editable mode:

    pip install -e .

Despite these steps, I received the following error:

ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.

I also tried creating a pyproject.toml file with the following content, but the issue persisted:

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

Additionally, I attempted to bypass the isolated build environment:

pip install --no-build-isolation -e .

However, the error still persists. Could you please provide guidance on how to resolve this issue? Is there a known problem with the setup.py or any dependencies in this branch that I should be aware of?

probberechts commented 1 month ago

Simply running the following works for me:

pip install git+https://github.com/probberechts/soccerdata.git@fix/whoscored-schedule

You could also try to install it using poetry.