Stats web scraper of Pro Football Reference
Project description
pro-football-reference-web-scraper
Web scraper to retrieve player and team data from Pro Football Reference.
Overview
pro-football-reference-web-scraper is a Python library that helps developers take advantage of the plethora of free data provided by Pro Football Reference. It is intended primarily to help fantasy sports players and sports bettors gain an edge in their NFL sports gaming endeavors. However, it can be used for any project that requires team- and player-specific data.
Installation
To install, run the following:
pip install pro-football-reference-web-scraper
Usage
Player Game Logs
The following code will retrieve and print Josh Allen's game log during the 2022 season as a pandas DataFrame.
player
: a player's full name, as it appears on Pro Football Reference
position
: 'QB', 'RB', 'TE', or 'WR'
season
: the season you are looking for (int)
from pro_football_reference_web_scraper import player_game_log as p
game_log = p.get_player_game_log(player = 'Josh Allen', position = 'QB', season = 2022)
print(game_log)
Team Game Logs
The following code will retrieve and print the Kansas City Chiefs' game log during the 1995 season as a pandas DataFrame.
team
: a team's full name (city and mascot), as it appears on Pro Football Reference
season
: the season you are looking for (int)
from pro_football_reference_web_scraper import team_game_log as t
game_log = t.get_team_game_log(team = 'Kansas City Chiefs', season = 1995)
print(game_log)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pro-football_reference_web_scrape_v2-0.2.0.tar.gz
.
File metadata
- Download URL: pro-football_reference_web_scrape_v2-0.2.0.tar.gz
- Upload date:
- Size: 37.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d7209ab4e1f3f40a2f71085ffb0ee67c88b214816d00f93e77dfa5d49994710 |
|
MD5 | 21e8333e5e4aa9513f4675059c3125ec |
|
BLAKE2b-256 | 1a1e8ce34f145fcc9115e4c679758382f0b8bc733741e73e8c1a684fcf2b9649 |
File details
Details for the file pro_football_reference_web_scrape_v2-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pro_football_reference_web_scrape_v2-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419a33313dab1348c320427ebe421c8354b47f1c2e854ef73c7f175d37bc4e36 |
|
MD5 | 0fc4b6218de3248ce0527361346b1915 |
|
BLAKE2b-256 | e53ba36612d4590415ad0779d2a9d606e0c7c2161884768064465115d67325b6 |