fbrefdata


Namefbrefdata JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/lorenzodb1/fbrefdata
SummaryA scraper of soccer data from FBref.
upload_time2024-03-18 07:49:36
maintainer
docs_urlNone
authorLorenzo De Bernardini
requires_python>=3.9,<3.13
licenseApache-2.0
keywords fbref soccer football soccer data web scraping soccer analytics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img src="https://raw.githubusercontent.com/lorenzodb1/fbrefdata/master/docs/_static/logo.png" width="300px"/>
</p>

**FBrefData** is a scraper of football data from [FBref](https://www.fbref.com/en/). The library is forked from 
[SoccerData](https://github.com/probberechts/soccerdata) by [@probberechts](https://github.com/probberechts). 

### Why FBrefData?
While [SoccerData](https://github.com/probberechts/soccerdata) does a great job at scraping data from [FBref](https://www.fbref.com/en/), it has some limitations
that I wanted to address. These limitations are, likely, due to the fact that it was originally built to scrape and
combine data from different sources, which is why this library focuses on [FBref](https://www.fbref.com/en/) only.

Some of the changes I wanted to introduce in **FBrefData** are:
- I wanted to store the dataframes that are obtained from scraping instead of storing the HTML pages themselves, thus 
reducing the amount of disk space required to cache the data;
- I wanted to support all competitions for which [FBref](https://www.fbref.com/en/) provides advance stats data, including the ones in the 
Southern emisphere and the Major League Soccer, and not just the top five European leagues;
- I wanted to remove the leagues selected by default, thus giving the users full control of which leagues they want to
scrape.

**FBrefData** forked from version 1.4.1 of [SoccerData](https://github.com/probberechts/soccerdata) and will start its versioning from 0.1.0. The improvements 
listed above, along with other minor changes, will be officially available starting from version 1.0.0. Nonetheless,
I will still merge improvements made to the FBref module of SoccerData for as long as it's possible.

### Installation
```bash
pip install fbrefdata
```

### Usage
```python
import fbrefdata as fd

# Create scraper class instance for the 2018-2019 Premier League
fbref = fd.FBref('ENG-Premier League', '2018-2019')

# Fetch dataframes
schedule = fbref.read_schedule()
```

### Supported leagues
As of now, **FBrefData** supports the following leagues:

- Argentina: Primera División
- Belgium: Pro League
- Brazil: Série A
- England: Premier League, EFL Championship
- France: Ligue 1, Ligue 2
- Germany: Fußball-Bundesliga, 2. Fußball-Bundesliga
- Italy: Serie A, Serie B
- Mexico: Liga MX
- Netherlands: Eredivisie
- Portugal: Primeira Liga
- Spain: La Liga, Segunda División
- United States/Canada: Major League Soccer
- UEFA: Champions League, Europa League, Europa Conference League
- CONMEBOL: Copa Libertadores

If [FBref](https://www.fbref.com/en/) started providing advanced stats for leagues that aren't supported yet, please open an issue.

---
**Disclaimer:** As this library relies on web scraping, any changes to the scraped websites will break the package. Hence,
do not expect that all code will work all the time. If you spot any bugs, then please
[fork it and start a pull request](https://github.com/lorenzodb1/fbrefdata/blob/master/CONTRIBUTING.rst).


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lorenzodb1/fbrefdata",
    "name": "fbrefdata",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<3.13",
    "maintainer_email": "",
    "keywords": "fbref,soccer,football,soccer data,web scraping,soccer analytics",
    "author": "Lorenzo De Bernardini",
    "author_email": "lorenzo@envs.net",
    "download_url": "https://files.pythonhosted.org/packages/6d/a7/d685cb5a0b217673b0887ff88f25b692a0ac5226b2ec99d8537e1040c3ee/fbrefdata-0.2.4.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img src=\"https://raw.githubusercontent.com/lorenzodb1/fbrefdata/master/docs/_static/logo.png\" width=\"300px\"/>\n</p>\n\n**FBrefData** is a scraper of football data from [FBref](https://www.fbref.com/en/). The library is forked from \n[SoccerData](https://github.com/probberechts/soccerdata) by [@probberechts](https://github.com/probberechts). \n\n### Why FBrefData?\nWhile [SoccerData](https://github.com/probberechts/soccerdata) does a great job at scraping data from [FBref](https://www.fbref.com/en/), it has some limitations\nthat I wanted to address. These limitations are, likely, due to the fact that it was originally built to scrape and\ncombine data from different sources, which is why this library focuses on [FBref](https://www.fbref.com/en/) only.\n\nSome of the changes I wanted to introduce in **FBrefData** are:\n- I wanted to store the dataframes that are obtained from scraping instead of storing the HTML pages themselves, thus \nreducing the amount of disk space required to cache the data;\n- I wanted to support all competitions for which [FBref](https://www.fbref.com/en/) provides advance stats data, including the ones in the \nSouthern emisphere and the Major League Soccer, and not just the top five European leagues;\n- I wanted to remove the leagues selected by default, thus giving the users full control of which leagues they want to\nscrape.\n\n**FBrefData** forked from version 1.4.1 of [SoccerData](https://github.com/probberechts/soccerdata) and will start its versioning from 0.1.0. The improvements \nlisted above, along with other minor changes, will be officially available starting from version 1.0.0. Nonetheless,\nI will still merge improvements made to the FBref module of SoccerData for as long as it's possible.\n\n### Installation\n```bash\npip install fbrefdata\n```\n\n### Usage\n```python\nimport fbrefdata as fd\n\n# Create scraper class instance for the 2018-2019 Premier League\nfbref = fd.FBref('ENG-Premier League', '2018-2019')\n\n# Fetch dataframes\nschedule = fbref.read_schedule()\n```\n\n### Supported leagues\nAs of now, **FBrefData** supports the following leagues:\n\n- Argentina: Primera Divisi\u00f3n\n- Belgium: Pro League\n- Brazil: S\u00e9rie A\n- England: Premier League, EFL Championship\n- France: Ligue 1, Ligue 2\n- Germany: Fu\u00dfball-Bundesliga, 2. Fu\u00dfball-Bundesliga\n- Italy: Serie A, Serie B\n- Mexico: Liga MX\n- Netherlands: Eredivisie\n- Portugal: Primeira Liga\n- Spain: La Liga, Segunda Divisi\u00f3n\n- United States/Canada: Major League Soccer\n- UEFA: Champions League, Europa League, Europa Conference League\n- CONMEBOL: Copa Libertadores\n\nIf [FBref](https://www.fbref.com/en/) started providing advanced stats for leagues that aren't supported yet, please open an issue.\n\n---\n**Disclaimer:** As this library relies on web scraping, any changes to the scraped websites will break the package. Hence,\ndo not expect that all code will work all the time. If you spot any bugs, then please\n[fork it and start a pull request](https://github.com/lorenzodb1/fbrefdata/blob/master/CONTRIBUTING.rst).\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A scraper of soccer data from FBref.",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/lorenzodb1/fbrefdata",
        "Repository": "https://github.com/lorenzodb1/fbrefdata"
    },
    "split_keywords": [
        "fbref",
        "soccer",
        "football",
        "soccer data",
        "web scraping",
        "soccer analytics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47794012fc1aeefe9a43baf22080b8cbe5a2b75ab376ce12202f1cecaf9495e6",
                "md5": "b9c45d4b528db33cae4d4103b750e9f9",
                "sha256": "76c484a6f2f81c54b710727726c65db14240aeff0ffaff73a0cc827fa1ccec28"
            },
            "downloads": -1,
            "filename": "fbrefdata-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9c45d4b528db33cae4d4103b750e9f9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<3.13",
            "size": 20672,
            "upload_time": "2024-03-18T07:49:34",
            "upload_time_iso_8601": "2024-03-18T07:49:34.702184Z",
            "url": "https://files.pythonhosted.org/packages/47/79/4012fc1aeefe9a43baf22080b8cbe5a2b75ab376ce12202f1cecaf9495e6/fbrefdata-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6da7d685cb5a0b217673b0887ff88f25b692a0ac5226b2ec99d8537e1040c3ee",
                "md5": "4be601586b4bd812934efaadeb78cb86",
                "sha256": "98125b23317c135989826097e53510d3694c3b0927f29e06570546d9bd51c405"
            },
            "downloads": -1,
            "filename": "fbrefdata-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4be601586b4bd812934efaadeb78cb86",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<3.13",
            "size": 20271,
            "upload_time": "2024-03-18T07:49:36",
            "upload_time_iso_8601": "2024-03-18T07:49:36.739772Z",
            "url": "https://files.pythonhosted.org/packages/6d/a7/d685cb5a0b217673b0887ff88f25b692a0ac5226b2ec99d8537e1040c3ee/fbrefdata-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 07:49:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lorenzodb1",
    "github_project": "fbrefdata",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fbrefdata"
}
        
Elapsed time: 0.20518s