PFR Parsers¶
parsers
¶
PFR HTML parsers package.
Re-exports the individual parser classes for convenient access::
from griddy.pfr.utils.parsers import ScheduleParser, GameDetailsParser
AwardsParser
¶
Parses PFR awards, HOF, and Pro Bowl pages into structured data dicts.
parse_award
¶
Parse an award history page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/awards.py
parse_hof
¶
Parse the Hall of Fame page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/awards.py
parse_probowl
¶
Parse a Pro Bowl roster page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/awards.py
BirthdaysParser
¶
Parses the PFR birthdays page.
parse
¶
Parse the birthdays page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR birthdays page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the birthdays table is not found. |
Source code in src/griddy/pfr/parsers/birthdays.py
BirthplacesParser
¶
Parses the PFR birthplaces pages (landing and filtered).
parse_landing
¶
Parse the birthplaces landing page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR birthplaces landing page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the birthplaces table is not found. |
Source code in src/griddy/pfr/parsers/birthplaces.py
parse_filtered
¶
Parse the birthplaces filtered (by location) page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR birthplaces filtered page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the birthplaces table is not found. |
Source code in src/griddy/pfr/parsers/birthplaces.py
CoachProfileParser
¶
Parses PFR coach profile pages into comprehensive data dicts.
parse
¶
Parse a PFR coach profile page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR coach profile page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: bio, coaching_results, coaching_results_totals, |
Dict[str, Any]
|
coaching_ranks, coaching_history, challenge_results, worked_for, |
Dict[str, Any]
|
employed. |
Source code in src/griddy/pfr/parsers/coach_profile.py
CupsOfCoffeeParser
¶
Parses the PFR 'Cups of Coffee' page.
parse
¶
Parse the cups of coffee page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR cups of coffee page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the coffee table is not found. |
Source code in src/griddy/pfr/parsers/cups_of_coffee.py
DraftParser
¶
Parses PFR draft pages into structured data dicts.
parse_year_draft
¶
Parse a year draft page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/draft.py
parse_combine
¶
Parse a combine page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/draft.py
parse_team_draft
¶
Parse a team draft page and return a dict for model validation.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/draft.py
ExecutiveProfileParser
¶
Parses a PFR executive profile page into structured data dicts.
parse
¶
Parse a full executive profile page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Dict[str, Any]
|
|
Source code in src/griddy/pfr/parsers/executive_profile.py
FantasyParser
¶
Parses PFR Fantasy Rankings pages into structured data dicts.
parse_top_players
¶
Parse the top fantasy players page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
parse_matchups
¶
Parse a fantasy matchups page.
Works for any position (QB, WR, RB, TE) since the parser reads
whichever data-stat columns are present in the table.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
parse_points_allowed
¶
Parse a fantasy points allowed page.
Works for any position (QB, WR, RB, TE) since the parser reads
whichever data-stat columns are present in the table.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
parse_redzone_passing
¶
Parse the red zone passing page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
parse_redzone_receiving
¶
Parse the red zone receiving page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
parse_redzone_rushing
¶
Parse the red zone rushing page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/fantasy.py
GameDetailsParser
¶
Parses PFR boxscore pages into comprehensive game data dicts.
parse
¶
Parse a PFR boxscore page into a comprehensive JSON-serializable dict.
Extracts all game-specific data from
/boxscores/{game_id}.htm pages, including:
- Scorebox metadata (teams, final scores, records, coaches)
- Quarter-by-quarter linescore
- Scoring plays
- Game info (coin toss, weather, surface, vegas line, etc.)
- Officials
- Expected points summary
- Team stats (first downs, yards, turnovers, etc.)
- Player offense (passing, rushing, receiving)
- Player defense (interceptions, tackles, sacks)
- Kick/punt returns
- Kicking & punting
- Home/visitor starters
- Home/visitor snap counts
- Home/visitor drives
Many tables on PFR boxscore pages are hidden inside HTML comments as an anti-scraping measure. The BaseSDK pre-processes the HTML to uncomment these tables before this parser runs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR boxscore page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with all extracted game data. |
Source code in src/griddy/pfr/parsers/game_details.py
LastUndefeatedParser
¶
Parses the PFR last-undefeated-team page.
parse
¶
Parse the last-undefeated-team page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR last-undefeated-team page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the undefeated_teams table is not found. |
Source code in src/griddy/pfr/parsers/last_undefeated.py
LeadersParser
¶
Parses PFR leader pages into structured data dicts.
parse
¶
Parse a leaders page and return a dict ready for model validation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML content of the leaders page. |
required |
stat
|
str
|
The stat key (e.g. |
required |
scope
|
str
|
The scope (e.g. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys |
Source code in src/griddy/pfr/parsers/leaders.py
MultiSportPlayersParser
¶
Parses the PFR 'Multisport Athletes' page.
parse
¶
Parse the multisport athletes page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR multisport athletes page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the multisport table is not found. |
Source code in src/griddy/pfr/parsers/multi_sport_players.py
MultiTeamPlayersParser
¶
Parses the PFR multi-franchise players results page.
parse
¶
Parse the multi-team players results page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR multi-franchise players results page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If no stats tables are found. |
Source code in src/griddy/pfr/parsers/multi_team_players.py
NonQBPassersParser
¶
Parses the PFR non-quarterback passers page.
parse
¶
Parse the non-quarterback passers page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR non-QB passers page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the nonqb_passers table is not found. |
Source code in src/griddy/pfr/parsers/non_qb_passers.py
NonSkillPosTdParser
¶
Parses the PFR non-skill position TD scorers page.
parse
¶
Parse the non-skill position TD scorers page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR odd TD scorers page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the odd_scorers table is not found. |
Source code in src/griddy/pfr/parsers/non_skill_pos_td.py
OctopusTrackerParser
¶
Parses the PFR octopus tracker page.
parse
¶
Parse the octopus tracker page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR octopus tracker page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the octopus table is not found. |
Source code in src/griddy/pfr/parsers/octopus_tracker.py
OfficialProfileParser
¶
Parses PFR official profile pages into comprehensive data dicts.
parse
¶
Parse a PFR official profile page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR official profile page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: bio, official_stats, games. |
Source code in src/griddy/pfr/parsers/official_profile.py
OvertimeTiesParser
¶
Parses the PFR overtime ties page.
parse
¶
Parse the overtime ties page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR overtime ties page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the overtime ties table is not found. |
Source code in src/griddy/pfr/parsers/overtime_ties.py
PlayerProfileParser
¶
Parses a PFR player profile page into a structured dict.
Extracts biographical metadata, jersey number history, career statistics (regular season and postseason), transactions, leaderboard appearances, and navigation links from a player's Pro Football Reference page.
Source code in src/griddy/pfr/parsers/player_profile.py
parse
¶
Parse a PFR player profile page into a structured dict.
Uncomments hidden HTML tables, then extracts bio, jersey numbers, summary stats, full career statistics, transactions, navigation links, and leaderboard data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR
|
required |
Returns:
| Type | Description |
|---|---|
PlayerProfile
|
A dict suitable for validation into a |
PlayerProfile
|
class: |
Source code in src/griddy/pfr/parsers/player_profile.py
PlayersBornBeforeParser
¶
Parses the PFR active players born before a date page.
parse
¶
Parse the active players born before a date page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR active players born before page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the players table is not found. |
Source code in src/griddy/pfr/parsers/players_born_before.py
PronunciationGuideParser
¶
Parses the PFR 'Pronunciation Guide' page.
parse
¶
Parse the pronunciation guide page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR pronunciation guide page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the pronunciation list is not found. |
Source code in src/griddy/pfr/parsers/pronunciation_guide.py
QBWinsParser
¶
Parses the PFR quarterback wins page.
parse
¶
Parse the quarterback wins page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR quarterback wins page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the qb_wins table is not found. |
Source code in src/griddy/pfr/parsers/qb_wins.py
ScheduleParser
¶
Parses the PFR season-schedule HTML table.
parse
¶
Parse the PFR season-schedule table into a list of ScheduleGame models.
Looks for <table id="games">, iterates over <tbody> <tr> rows,
and skips:
- Separator rows (
class="thead") - Rows where all data cells are empty (e.g. the "Playoffs" label row)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR |
required |
Returns:
| Type | Description |
|---|---|
List[ScheduleGame]
|
A list of |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If |
Source code in src/griddy/pfr/parsers/schedule.py
SchoolsParser
¶
Parses PFR Schools & Colleges pages into structured data dicts.
parse_colleges
¶
Parse the colleges / universities index page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/schools.py
parse_high_schools
¶
Parse the high schools index page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/schools.py
SeasonOverviewParser
¶
Parses PFR season overview and stat category pages.
parse
¶
Parse a PFR season overview page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: afc_standings, nfc_standings, playoff_results, |
Dict[str, Any]
|
afc_playoff_standings, nfc_playoff_standings, and team stat tables. |
Source code in src/griddy/pfr/parsers/season_overview.py
parse_stats
¶
Parse a PFR stat category page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: regular_season, postseason — each a list of |
Dict[str, Any]
|
per-player stat dicts. |
Source code in src/griddy/pfr/parsers/season_overview.py
parse_week
¶
Parse a PFR week summary page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: games, players_of_the_week, top_passers, |
Dict[str, Any]
|
top_receivers, top_rushers, top_defenders. |
Source code in src/griddy/pfr/parsers/season_overview.py
StadiumParser
¶
Parses PFR stadium pages into comprehensive data dicts.
parse
¶
Parse a PFR stadium page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR stadium page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: bio, leaders, best_games, best_playoff_games, |
Dict[str, Any]
|
game_summaries. |
Source code in src/griddy/pfr/parsers/stadium.py
StandingsOnDateParser
¶
Parses the PFR standings-on-date page.
parse
¶
Parse the standings-on-date page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR standings page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If no conference standings tables are found. |
Source code in src/griddy/pfr/parsers/standings_on_date.py
StatisticalMilestonesParser
¶
Parses the PFR statistical milestones page.
parse
¶
Parse the statistical milestones page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR milestones page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the milestones table is not found. |
Source code in src/griddy/pfr/parsers/statistical_milestones.py
SuperBowlParser
¶
Parses PFR Super Bowl pages into structured data dicts.
parse_history
¶
Parse the Super Bowl history page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/superbowl.py
parse_leaders
¶
Parse the Super Bowl leaders page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/superbowl.py
parse_standings
¶
Parse the Super Bowl standings page.
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with key |
Source code in src/griddy/pfr/parsers/superbowl.py
FranchiseParser
¶
Parses PFR team franchise pages into comprehensive data dicts.
parse
¶
Parse a PFR team franchise page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR team franchise page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: meta, team_index. |
Source code in src/griddy/pfr/parsers/team_franchise.py
TeamSeasonParser
¶
Parses PFR team season pages into comprehensive data dicts.
parse
¶
Parse a PFR team season page into a JSON-serializable dict.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML string of a PFR team season page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict with keys: meta, team_stats, games, team_conversions, |
Dict[str, Any]
|
passing, passing_post, rushing_and_receiving. |
Source code in src/griddy/pfr/parsers/team_season.py
UniformNumbersParser
¶
Parses the PFR uniform numbers page.
parse
¶
Parse the uniform numbers page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR uniform numbers page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the uniform_number table is not found. |
Source code in src/griddy/pfr/parsers/uniform_numbers.py
UpcomingMilestonesParser
¶
Parses the PFR upcoming milestones page.
parse
¶
Parse the upcoming milestones page.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
html
|
str
|
Raw HTML of the PFR upcoming milestones page. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
A dict ready for |
Raises:
| Type | Description |
|---|---|
ParsingError
|
If the milestones table is not found. |