Skip to content

v4.0.0

Choose a tag to compare

@oseymour oseymour released this 24 Dec 05:30
· 19 commits to main since this release

YANKED: This release had a bug (the comps.yaml file was excluded from the build). Please use v4.0.1 instead. This release has been yanked from PyPI.

  • Sofascore
    • Added Bulgarian and Ukrainian first divisions
    • Added scrape_team_league_stats() function to resolve #64
  • FBref
    • Started using Botasaurus driver in headed mode for scraping. Selenium (especially in headless), was not stable.
      • This should resolve issue #58
    • Broke the code for scrape_match() and scrape_stats() out into helper functions in separate files
    • scrape_match() now returns the names of the center referee, 4th official, both ARs, and the VAR if they are available
    • Added an FBrefMatch data class that contains all data for an FBref match. scrape_match() returns a single instance of this class, scrape_matches() returns a list of instances.
  • Transfermarkt
    • Also started using Botasaurus for some parts of this module as well.
  • ClubElo
    • Added 3 new functions:
      • scrape_team() scrapes all historical ELO scores for a given team
      • scrape_date() scrapes ELO scores for all teams on a given date
      • scrape_fixtures() scrapes upcoming fixtures. WARNING: This is very unstable, the ClubElo API doesn't seem to be able to to reliably return this data.
  • Behind the scenes
    • Added some Botasaurus getters to utils. Using the driver and requests to get JSON and Beautiful Soup.
    • With Sphinx, figured out a way to link to other parts of the docs in the docstrings of function definitions. Used this to link to a single location for each module's year parameter, rather than having the same text copy-pasted into every function.
    • Dropped support for Python 3.9. Added support for Python 3.13.
    • comps.yaml
      • I moved all competition details back into a single file, rather than defined at the start of each module's .py file. The advantages are a) all of the competition info is in one place and b) every competition will be forced to have the same name across modules now. This is a breaking change because pretty much every league name has been changed. As always, if you try to scrape with an invalid league name the error message will print out valid league names for the module you're trying to use.
    • Config files
      • Used to have many of the CI/CD tool configs in pyproject.toml. These have pretty much all been broken out into their own config files.