Skip to main content

pro-football-reference-web-scraper

Web scraper to retrieve player and team data from Pro Football Reference.

License GitHub issues codecov Package Status PyPI readthedocs Github Pages Docs

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)

Metadata

Release files for pro-football-reference-web-scraper 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pro-football-reference-web-scraper 0.2.1
File Size Uploaded Provenance Actions
pro-football_reference_web_scraper-0.2.1.tar.gz 37.0 kB Without provenance Details for pro-football_reference_web_scraper-0.2.1.tar.gz

Release files / pro-football_reference_web_scraper-0.2.1.tar.gz

Download URL pro-football_reference_web_scraper-0.2.1.tar.gz
Size 37.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28396ed5cd4a68b525e5d1dac442eb105a416878c636dcf22b248a83ab4aff78
BLAKE2b-256 checksum
How to use checksums
e059b6fd89aae2aefd3842459c986c36eb891572f4f2ca6dd3460ad93228ae53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Security for pro-football-reference-web-scraper 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page