sportsball 0.3.14__tar.gz → 0.3.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sportsball-0.3.14/sportsball.egg-info → sportsball-0.3.16}/PKG-INFO +4 -1
- {sportsball-0.3.14 → sportsball-0.3.16}/README.md +3 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/setup.py +1 -1
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/__init__.py +1 -1
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/afl_afltables_game_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/afl_afltables_player_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_game_model.py +7 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_league_model.py +8 -2
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_game_model.py +5 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_league_model.py +21 -4
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_player_model.py +5 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_game_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_player_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/game_model.py +2 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/google/google_address_model.py +67 -54
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/nba/nba_nba_game_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/nba/nba_nba_player_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/nba/nba_nba_team_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/player_model.py +6 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsdb/sportsdb_game_model.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsdb/sportsdb_league_model.py +13 -12
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/sportsreference_game_model.py +21 -7
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/sportsreference_player_model.py +11 -4
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/sportsreference_team_model.py +35 -5
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/team_model.py +20 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/openmeteo/openmeteo_weather_model.py +15 -9
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/proxy_session.py +47 -20
- {sportsball-0.3.14 → sportsball-0.3.16/sportsball.egg-info}/PKG-INFO +4 -1
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/aussportsbetting/aussportsbetting_game_model_test.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/combined/combined_game_model_test.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/combined/combined_player_model_test.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/game_model_test.py +2 -1
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/nba/nba_nba_game_model_test.py +4 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/nba/nba_nba_team_model_test.py +2 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/player_model_test.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/sportsreference_player_model_test.py +1 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/sportsreference_team_model_test.py +3 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/LICENSE +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/MANIFEST.in +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/requirements.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/setup.cfg +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/__main__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/args.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/cache.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/address_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/afl_afltables_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/afl_afltables_team_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/afltables/afl_afltables_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/aussportsbetting/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/aussportsbetting/afl_aussportsbetting_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/combined/afl_combined_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/afl/espn/afl_espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_bookie_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_odds_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_team_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/aussportsbetting/aussportsbetting_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/bookie_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_address_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_team_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/combined/combined_weather_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_bookie_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_odds_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_team_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/espn/espn_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/field_type.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/google/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/google/google_news_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/league.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/combined/nba_combined_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/espn/nba_espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/nba/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/nba/nba_nba_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/sportsdb/nba_sportsdb_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nba/sportsreference/nba_sportsreference_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/combined/ncaab_combined_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/espn/ncaab_espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaab/sportsreference/ncaab_sportsreference_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaaf/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaaf/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/ncaaf/espn/ncaaf_espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/news_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/aussportsbetting/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/aussportsbetting/nfl_aussportsbetting_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/combined/nfl_combined_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/espn/nfl_espn_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/nfl/sportsdb/nfl_sportsdb_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/odds_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/season_type.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/social_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsdb/sportsdb_team_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsdb/sportsdb_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/sportsreference_league_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/sportsreference/sportsreference_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/gribstream/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/gribstream/gribstream_weather_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/multi_weather_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather/openmeteo/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/weather_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/wikipedia/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/wikipedia/wikipedia_venue_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/x/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/data/x/x_social_model.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/logger.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/loglevel.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/session.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball/sportsball.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/SOURCES.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/dependency_links.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/entry_points.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/not-zip-safe +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/requires.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/sportsball.egg-info/top_level.txt +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/afl/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/afl/afltables/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/afl/afltables/afl_afltables_player_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/aussportsbetting/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/combined/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/espn/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/espn/espn_game_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/espn/espn_player_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/google/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/google/google_address_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/google/google_news_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/nba/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/nba/nba_nba_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/nba/nba_nba_player_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/sportsdb/nba_sportsdb_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nba/sportsreference/nba_sportsreference_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/ncaab/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/ncaab/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/ncaab/sportsreference/ncaab_sportsreference_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nfl/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nfl/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/nfl/sportsdb/nfl_sportsdb_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/social_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsdb/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsdb/sportsdb_game_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsdb/sportsdb_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsdb/sportsdb_team_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsdb/sportsdb_venue_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/sportsreference_game_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/sportsreference_league_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/sportsreference/sportsreference_venue_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/team_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/x/__init__.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/data/x/x_social_model_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/proxy_session_test.py +0 -0
- {sportsball-0.3.14 → sportsball-0.3.16}/tests/sportsball_test.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: sportsball
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.16
|
4
4
|
Summary: A library for pulling in and normalising sports stats.
|
5
5
|
Home-page: https://github.com/8W9aG/sportsball
|
6
6
|
Author: Will Sackfield
|
@@ -145,6 +145,7 @@ A representation of the game within a season.
|
|
145
145
|
* **year** The year the game was in.
|
146
146
|
* **season_type**: The type of the season the game was played in.
|
147
147
|
* **postponed**: Whether the game was postponed.
|
148
|
+
* **playoff**: Whether the game was a playoff game.
|
148
149
|
|
149
150
|
#### Team
|
150
151
|
|
@@ -163,6 +164,7 @@ A representation of a team within a game.
|
|
163
164
|
* **field_goals**: The sum of the field goals made by the team in the game.
|
164
165
|
* **field_goals_attempted**: The sum of the field goals attempted by the team in the game.
|
165
166
|
* **offensive_rebounds**: The number of rebounds during offense by the team in the game.
|
167
|
+
* **assists**: The number of times the player on the team made a pass that resulted in a field goal in the game.
|
166
168
|
|
167
169
|
#### Player
|
168
170
|
|
@@ -176,6 +178,7 @@ A representation of a player within a team within a game.
|
|
176
178
|
* **field_goals**: The number of field goals the player made in the game.
|
177
179
|
* **field_goals_attempted**: The number of field goal attempts the player made in the game.
|
178
180
|
* **offensive_rebounds**: The number of rebounds during offense by the player made in the game.
|
181
|
+
* **assists**: The number of times the player made a pass that resulted in a field goal in the game.
|
179
182
|
|
180
183
|
#### Odds
|
181
184
|
|
@@ -92,6 +92,7 @@ A representation of the game within a season.
|
|
92
92
|
* **year** The year the game was in.
|
93
93
|
* **season_type**: The type of the season the game was played in.
|
94
94
|
* **postponed**: Whether the game was postponed.
|
95
|
+
* **playoff**: Whether the game was a playoff game.
|
95
96
|
|
96
97
|
#### Team
|
97
98
|
|
@@ -110,6 +111,7 @@ A representation of a team within a game.
|
|
110
111
|
* **field_goals**: The sum of the field goals made by the team in the game.
|
111
112
|
* **field_goals_attempted**: The sum of the field goals attempted by the team in the game.
|
112
113
|
* **offensive_rebounds**: The number of rebounds during offense by the team in the game.
|
114
|
+
* **assists**: The number of times the player on the team made a pass that resulted in a field goal in the game.
|
113
115
|
|
114
116
|
#### Player
|
115
117
|
|
@@ -123,6 +125,7 @@ A representation of a player within a team within a game.
|
|
123
125
|
* **field_goals**: The number of field goals the player made in the game.
|
124
126
|
* **field_goals_attempted**: The number of field goal attempts the player made in the game.
|
125
127
|
* **offensive_rebounds**: The number of rebounds during offense by the player made in the game.
|
128
|
+
* **assists**: The number of times the player made a pass that resulted in a field goal in the game.
|
126
129
|
|
127
130
|
#### Odds
|
128
131
|
|
@@ -23,7 +23,7 @@ def install_requires() -> typing.List[str]:
|
|
23
23
|
|
24
24
|
setup(
|
25
25
|
name='sportsball',
|
26
|
-
version='0.3.
|
26
|
+
version='0.3.16',
|
27
27
|
description='A library for pulling in and normalising sports stats.',
|
28
28
|
long_description=long_description,
|
29
29
|
long_description_content_type='text/markdown',
|
@@ -24,6 +24,7 @@ def _create_aussportsbetting_game_model(
|
|
24
24
|
home_odds: float,
|
25
25
|
away_odds: float,
|
26
26
|
league: League,
|
27
|
+
play_off: bool,
|
27
28
|
) -> GameModel:
|
28
29
|
venue_model = None
|
29
30
|
if venue is not None:
|
@@ -46,6 +47,7 @@ def _create_aussportsbetting_game_model(
|
|
46
47
|
year=None,
|
47
48
|
season_type=None,
|
48
49
|
postponed=None,
|
50
|
+
play_off=play_off,
|
49
51
|
)
|
50
52
|
|
51
53
|
|
@@ -61,6 +63,7 @@ def _cached_create_aussportsbetting_game_model(
|
|
61
63
|
home_odds: float,
|
62
64
|
away_odds: float,
|
63
65
|
league: League,
|
66
|
+
play_off: bool,
|
64
67
|
) -> GameModel:
|
65
68
|
return _create_aussportsbetting_game_model(
|
66
69
|
dt,
|
@@ -73,6 +76,7 @@ def _cached_create_aussportsbetting_game_model(
|
|
73
76
|
home_odds,
|
74
77
|
away_odds,
|
75
78
|
league,
|
79
|
+
play_off,
|
76
80
|
)
|
77
81
|
|
78
82
|
|
@@ -87,6 +91,7 @@ def create_aussportsbetting_game_model(
|
|
87
91
|
home_odds: float,
|
88
92
|
away_odds: float,
|
89
93
|
league: League,
|
94
|
+
play_off: bool,
|
90
95
|
) -> GameModel:
|
91
96
|
"""Create a game model based off aus sports betting."""
|
92
97
|
if not pytest_is_running.is_running() and dt < datetime.datetime.now().replace(
|
@@ -103,6 +108,7 @@ def create_aussportsbetting_game_model(
|
|
103
108
|
home_odds,
|
104
109
|
away_odds,
|
105
110
|
league,
|
111
|
+
play_off,
|
106
112
|
)
|
107
113
|
with session.cache_disabled():
|
108
114
|
return _create_aussportsbetting_game_model(
|
@@ -116,4 +122,5 @@ def create_aussportsbetting_game_model(
|
|
116
122
|
home_odds,
|
117
123
|
away_odds,
|
118
124
|
league,
|
125
|
+
play_off,
|
119
126
|
)
|
@@ -57,10 +57,15 @@ class AusSportsBettingLeagueModel(LeagueModel):
|
|
57
57
|
current_cell_idx += 1
|
58
58
|
away_points = float(row[current_cell_idx].value) # type: ignore
|
59
59
|
current_cell_idx += 1
|
60
|
+
|
60
61
|
if self.league == League.NFL:
|
61
|
-
current_cell_idx +=
|
62
|
+
current_cell_idx += 1
|
63
|
+
play_off = row[current_cell_idx].value == "Y"
|
64
|
+
|
65
|
+
if self.league == League.NFL:
|
66
|
+
current_cell_idx += 2
|
62
67
|
else:
|
63
|
-
current_cell_idx +=
|
68
|
+
current_cell_idx += 4
|
64
69
|
home_odds = float(row[current_cell_idx].value) # type: ignore
|
65
70
|
current_cell_idx += 1
|
66
71
|
if self.league == League.NFL:
|
@@ -78,6 +83,7 @@ class AusSportsBettingLeagueModel(LeagueModel):
|
|
78
83
|
home_odds,
|
79
84
|
away_odds,
|
80
85
|
self.league,
|
86
|
+
play_off,
|
81
87
|
)
|
82
88
|
|
83
89
|
@property
|
@@ -71,6 +71,7 @@ def create_combined_game_model(
|
|
71
71
|
week = None
|
72
72
|
game_number = None
|
73
73
|
postponed = None
|
74
|
+
play_off = None
|
74
75
|
for game_model in game_models:
|
75
76
|
game_model_attendance = game_model.attendance
|
76
77
|
if game_model_attendance is not None:
|
@@ -93,6 +94,9 @@ def create_combined_game_model(
|
|
93
94
|
game_model_postponed = game_model.postponed
|
94
95
|
if game_model_postponed is not None:
|
95
96
|
postponed = game_model_postponed
|
97
|
+
game_model_play_off = game_model.play_off
|
98
|
+
if game_model_play_off is not None:
|
99
|
+
play_off = game_model_play_off
|
96
100
|
|
97
101
|
if full_venue_identity is None and venue_models:
|
98
102
|
for venue_model in venue_models:
|
@@ -112,4 +116,5 @@ def create_combined_game_model(
|
|
112
116
|
year=year,
|
113
117
|
season_type=season_type,
|
114
118
|
postponed=postponed,
|
119
|
+
play_off=play_off,
|
115
120
|
)
|
@@ -3,7 +3,7 @@
|
|
3
3
|
import logging
|
4
4
|
import multiprocessing
|
5
5
|
from multiprocessing import Pool
|
6
|
-
from typing import Iterator
|
6
|
+
from typing import Any, Iterator
|
7
7
|
|
8
8
|
import requests_cache
|
9
9
|
|
@@ -14,9 +14,13 @@ from ..league_model import LeagueModel
|
|
14
14
|
from .combined_game_model import create_combined_game_model
|
15
15
|
|
16
16
|
|
17
|
-
def _produce_league_games(league_model: LeagueModel) -> list[
|
17
|
+
def _produce_league_games(league_model: LeagueModel) -> list[dict[str, Any]]:
|
18
18
|
setup_logger()
|
19
|
-
|
19
|
+
try:
|
20
|
+
return [x.model_dump() for x in league_model.games]
|
21
|
+
except Exception as exc:
|
22
|
+
logging.error("Exception: %s", str(exc))
|
23
|
+
raise ValueError(str(exc))
|
20
24
|
|
21
25
|
|
22
26
|
class CombinedLeagueModel(LeagueModel):
|
@@ -52,7 +56,20 @@ class CombinedLeagueModel(LeagueModel):
|
|
52
56
|
for league_model in self._league_models:
|
53
57
|
league_model.clear_session()
|
54
58
|
with Pool(min(multiprocessing.cpu_count(), len(self._league_models))) as p:
|
55
|
-
|
59
|
+
# We want to terminate immediately if any of our runners runs into trouble.
|
60
|
+
def _error_callback(exc: BaseException) -> None:
|
61
|
+
p.terminate()
|
62
|
+
raise ValueError(str(exc))
|
63
|
+
|
64
|
+
results = [
|
65
|
+
p.apply_async(
|
66
|
+
_produce_league_games, args=(x,), error_callback=_error_callback
|
67
|
+
)
|
68
|
+
for x in self._league_models
|
69
|
+
]
|
70
|
+
game_lists = [
|
71
|
+
[GameModel.model_validate(y) for y in x.get()] for x in results
|
72
|
+
]
|
56
73
|
|
57
74
|
for game_list in game_lists:
|
58
75
|
for game_model in game_list:
|
@@ -15,6 +15,7 @@ def create_combined_player_model(
|
|
15
15
|
field_goals = None
|
16
16
|
field_goals_attempted = None
|
17
17
|
offensive_rebounds = None
|
18
|
+
assists = None
|
18
19
|
for player_model in player_models:
|
19
20
|
player_model_jersey = player_model.jersey
|
20
21
|
if player_model_jersey is not None:
|
@@ -37,6 +38,9 @@ def create_combined_player_model(
|
|
37
38
|
player_model_offensive_rebounds = player_model.offensive_rebounds
|
38
39
|
if player_model_offensive_rebounds is not None:
|
39
40
|
offensive_rebounds = player_model_offensive_rebounds
|
41
|
+
player_model_assists = player_model.assists
|
42
|
+
if player_model_assists is not None:
|
43
|
+
assists = player_model_assists
|
40
44
|
return PlayerModel(
|
41
45
|
identifier=identifier,
|
42
46
|
jersey=jersey,
|
@@ -46,4 +50,5 @@ def create_combined_player_model(
|
|
46
50
|
field_goals=field_goals,
|
47
51
|
field_goals_attempted=field_goals_attempted,
|
48
52
|
offensive_rebounds=offensive_rebounds,
|
53
|
+
assists=assists,
|
49
54
|
)
|
@@ -22,6 +22,7 @@ GAME_WEEK_COLUMN: Literal["week"] = "week"
|
|
22
22
|
LEAGUE_COLUMN: Literal["league"] = "league"
|
23
23
|
END_DT_COLUMN: Literal["end_dt"] = "end_dt"
|
24
24
|
POSTPONED_COLUMN: Literal["postponed"] = "postponed"
|
25
|
+
PLAY_OFF_COLUMN: Literal["play_off"] = "play_off"
|
25
26
|
|
26
27
|
|
27
28
|
def localize(venue: VenueModel | None, dt: datetime.datetime) -> datetime.datetime:
|
@@ -59,3 +60,4 @@ class GameModel(BaseModel):
|
|
59
60
|
postponed: bool | None = Field(
|
60
61
|
..., json_schema_extra={TYPE_KEY: FieldType.LOOKAHEAD}, alias=POSTPONED_COLUMN
|
61
62
|
)
|
63
|
+
play_off: bool | None = Field(..., alias=PLAY_OFF_COLUMN)
|
@@ -973,6 +973,60 @@ GOLDEN_1_CENTER = SportsballGeocodeTuple(
|
|
973
973
|
housenumber="500",
|
974
974
|
country="USA",
|
975
975
|
)
|
976
|
+
DELTA_CENTER = SportsballGeocodeTuple(
|
977
|
+
city="Salt Lake City",
|
978
|
+
state="UT",
|
979
|
+
postal="",
|
980
|
+
lat=40.768333,
|
981
|
+
lng=-111.901111,
|
982
|
+
housenumber="301",
|
983
|
+
country="USA",
|
984
|
+
)
|
985
|
+
ATT_CENTER = SportsballGeocodeTuple(
|
986
|
+
city="San Antonio",
|
987
|
+
state="TX",
|
988
|
+
postal="",
|
989
|
+
lat=29.426944,
|
990
|
+
lng=-98.4375,
|
991
|
+
housenumber="1",
|
992
|
+
country="USA",
|
993
|
+
)
|
994
|
+
FTX_ARENA = SportsballGeocodeTuple(
|
995
|
+
city="Miami",
|
996
|
+
state="FL",
|
997
|
+
postal="",
|
998
|
+
lat=25.781389,
|
999
|
+
lng=-80.188056,
|
1000
|
+
housenumber="601",
|
1001
|
+
country="USA",
|
1002
|
+
)
|
1003
|
+
VIVINT_ARENA = SportsballGeocodeTuple(
|
1004
|
+
city="Salt Lake City",
|
1005
|
+
state="UT",
|
1006
|
+
postal="",
|
1007
|
+
lat=40.768333,
|
1008
|
+
lng=-111.901111,
|
1009
|
+
housenumber="301",
|
1010
|
+
country="USA",
|
1011
|
+
)
|
1012
|
+
CHESAPEAKE_ENERGY_ARENA = SportsballGeocodeTuple(
|
1013
|
+
city="Oklahoma City",
|
1014
|
+
state="OK",
|
1015
|
+
postal="",
|
1016
|
+
lat=35.463333,
|
1017
|
+
lng=-97.515,
|
1018
|
+
housenumber="100",
|
1019
|
+
country="USA",
|
1020
|
+
)
|
1021
|
+
ESPN_WIDE_WORLD_OF_SPORTS_COMPLEX = SportsballGeocodeTuple(
|
1022
|
+
city="Lake Buena Vista",
|
1023
|
+
state="FL",
|
1024
|
+
postal="32830",
|
1025
|
+
lat=28.337083,
|
1026
|
+
lng=-81.556,
|
1027
|
+
housenumber="1375",
|
1028
|
+
country="USA",
|
1029
|
+
)
|
976
1030
|
_CACHED_GEOCODES: dict[str, Any] = {
|
977
1031
|
"S.C.G. - Australia": SCG,
|
978
1032
|
"Victoria Park - Australia": SportsballGeocodeTuple(
|
@@ -6288,15 +6342,7 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6288
6342
|
housenumber="200",
|
6289
6343
|
country="USA",
|
6290
6344
|
),
|
6291
|
-
"Vivint Arena, Salt Lake City, Utah":
|
6292
|
-
city="Salt Lake City",
|
6293
|
-
state="UT",
|
6294
|
-
postal="",
|
6295
|
-
lat=40.768333,
|
6296
|
-
lng=-111.901111,
|
6297
|
-
housenumber="301",
|
6298
|
-
country="USA",
|
6299
|
-
),
|
6345
|
+
"Vivint Arena, Salt Lake City, Utah": VIVINT_ARENA,
|
6300
6346
|
"Rock Hill Sports & Event Center, Rock Hill, South Carolina": SportsballGeocodeTuple(
|
6301
6347
|
city="Rock Hill",
|
6302
6348
|
state="SC",
|
@@ -6487,24 +6533,8 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6487
6533
|
"Pepsi Center - Denver, Colorado, U.S. - United States": PEPSI_CENTRE,
|
6488
6534
|
"Staples Center": STAPLES_CENTRE,
|
6489
6535
|
"American Airlines Arena": AMERICAN_AIRLINES_ARENA,
|
6490
|
-
"Chesapeake Energy Arena - Oklahoma City, Oklahoma - United States":
|
6491
|
-
|
6492
|
-
state="OK",
|
6493
|
-
postal="",
|
6494
|
-
lat=35.463333,
|
6495
|
-
lng=-97.515,
|
6496
|
-
housenumber="100",
|
6497
|
-
country="USA",
|
6498
|
-
),
|
6499
|
-
"AT&T Center - San Antonio, Texas - United States": SportsballGeocodeTuple(
|
6500
|
-
city="San Antonio",
|
6501
|
-
state="TX",
|
6502
|
-
postal="",
|
6503
|
-
lat=29.426944,
|
6504
|
-
lng=-98.4375,
|
6505
|
-
housenumber="1",
|
6506
|
-
country="USA",
|
6507
|
-
),
|
6536
|
+
"Chesapeake Energy Arena - Oklahoma City, Oklahoma - United States": CHESAPEAKE_ENERGY_ARENA,
|
6537
|
+
"AT&T Center - San Antonio, Texas - United States": ATT_CENTER,
|
6508
6538
|
"Oakland Arena - Oakland, California - United States": SportsballGeocodeTuple(
|
6509
6539
|
city="Oakland",
|
6510
6540
|
state="CA",
|
@@ -6514,15 +6544,7 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6514
6544
|
housenumber="7000",
|
6515
6545
|
country="USA",
|
6516
6546
|
),
|
6517
|
-
"ESPN Wide World of Sports Complex":
|
6518
|
-
city="Lake Buena Vista",
|
6519
|
-
state="FL",
|
6520
|
-
postal="32830",
|
6521
|
-
lat=28.337083,
|
6522
|
-
lng=-81.556,
|
6523
|
-
housenumber="1375",
|
6524
|
-
country="USA",
|
6525
|
-
),
|
6547
|
+
"ESPN Wide World of Sports Complex": ESPN_WIDE_WORLD_OF_SPORTS_COMPLEX,
|
6526
6548
|
"International Amphitheatre": SportsballGeocodeTuple(
|
6527
6549
|
city="Chicago",
|
6528
6550
|
state="IL",
|
@@ -6798,15 +6820,7 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6798
6820
|
),
|
6799
6821
|
"Target Center - Minneapolis, Minnesota - United States": TARGET_CENTER,
|
6800
6822
|
"Thomas & Mack Center - Paradise, NV - United States": THOMAS_AND_MACK_CENTER,
|
6801
|
-
"Delta Center - Salt Lake City, Utah - United States":
|
6802
|
-
city="Salt Lake City",
|
6803
|
-
state="UT",
|
6804
|
-
postal="",
|
6805
|
-
lat=40.768333,
|
6806
|
-
lng=-111.901111,
|
6807
|
-
housenumber="301",
|
6808
|
-
country="USA",
|
6809
|
-
),
|
6823
|
+
"Delta Center - Salt Lake City, Utah - United States": DELTA_CENTER,
|
6810
6824
|
"Yokohama Arena": SportsballGeocodeTuple(
|
6811
6825
|
city="Kanagawa",
|
6812
6826
|
state="",
|
@@ -6829,15 +6843,7 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6829
6843
|
"Amway Arena": ORLANDO_ARENA,
|
6830
6844
|
"TD Garden - Boston, Massachusetts - United States": TD_GARDEN,
|
6831
6845
|
"American Airlines Center - Dallas, Texas, USA - United States": AMERICAN_AIRLINES_ARENA,
|
6832
|
-
"FTX Arena":
|
6833
|
-
city="Miami",
|
6834
|
-
state="FL",
|
6835
|
-
postal="",
|
6836
|
-
lat=25.781389,
|
6837
|
-
lng=-80.188056,
|
6838
|
-
housenumber="601",
|
6839
|
-
country="USA",
|
6840
|
-
),
|
6846
|
+
"FTX Arena": FTX_ARENA,
|
6841
6847
|
"Rose Garden": SportsballGeocodeTuple(
|
6842
6848
|
city="Portland",
|
6843
6849
|
state="OR",
|
@@ -6981,6 +6987,13 @@ _CACHED_GEOCODES: dict[str, Any] = {
|
|
6981
6987
|
housenumber="3930",
|
6982
6988
|
country="USA",
|
6983
6989
|
),
|
6990
|
+
"Delta Center, Salt Lake City, Utah": DELTA_CENTER,
|
6991
|
+
"AT&T Center, San Antonio, Texas": ATT_CENTER,
|
6992
|
+
"FTX Arena, Miami, Florida": FTX_ARENA,
|
6993
|
+
"Vivint Smart Home Arena, Salt Lake City, Utah": VIVINT_ARENA,
|
6994
|
+
"Chesapeake Energy Arena, Oklahoma City, Oklahoma": CHESAPEAKE_ENERGY_ARENA,
|
6995
|
+
"The Arena, Bay Lake, Florida": ESPN_WIDE_WORLD_OF_SPORTS_COMPLEX,
|
6996
|
+
"HP Field House, Bay Lake, Florida": ESPN_WIDE_WORLD_OF_SPORTS_COMPLEX,
|
6984
6997
|
}
|
6985
6998
|
|
6986
6999
|
|
@@ -13,6 +13,7 @@ PLAYER_FUMBLES_LOST_COLUMN: Literal["fumbles_lost"] = "fumbles_lost"
|
|
13
13
|
FIELD_GOALS_COLUMN: Literal["field_goals"] = "field_goals"
|
14
14
|
FIELD_GOALS_ATTEMPTED_COLUMN: Literal["field_goals_attempted"] = "field_goals_attempted"
|
15
15
|
OFFENSIVE_REBOUNDS_COLUMN: Literal["offensive_rebounds"] = "offensive_rebounds"
|
16
|
+
ASSISTS_COLUMN: Literal["assists"] = "assists"
|
16
17
|
|
17
18
|
|
18
19
|
class PlayerModel(BaseModel):
|
@@ -54,3 +55,8 @@ class PlayerModel(BaseModel):
|
|
54
55
|
json_schema_extra={TYPE_KEY: FieldType.LOOKAHEAD},
|
55
56
|
alias=OFFENSIVE_REBOUNDS_COLUMN,
|
56
57
|
)
|
58
|
+
assists: int | None = Field(
|
59
|
+
...,
|
60
|
+
json_schema_extra={TYPE_KEY: FieldType.LOOKAHEAD},
|
61
|
+
alias=ASSISTS_COLUMN,
|
62
|
+
)
|
@@ -103,18 +103,19 @@ class SportsDBLeagueModel(LeagueModel):
|
|
103
103
|
except ValueError:
|
104
104
|
pass
|
105
105
|
case SeasonType.REGULAR:
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
106
|
+
if self.league != League.NBA:
|
107
|
+
try:
|
108
|
+
for count, round_str in enumerate(range(1, 125)):
|
109
|
+
yield from self._produce_games(
|
110
|
+
str(round_str),
|
111
|
+
count,
|
112
|
+
self._league_id,
|
113
|
+
season_year,
|
114
|
+
season_type,
|
115
|
+
pbar,
|
116
|
+
)
|
117
|
+
except ValueError:
|
118
|
+
pass
|
118
119
|
case SeasonType.POSTSEASON:
|
119
120
|
for count, round_str in enumerate(
|
120
121
|
[125, 150, 160, 170, 180, 200]
|
@@ -1,12 +1,12 @@
|
|
1
1
|
"""Sports Reference game model."""
|
2
2
|
|
3
|
-
# pylint: disable=too-many-locals,too-many-statements,unused-argument
|
3
|
+
# pylint: disable=too-many-locals,too-many-statements,unused-argument,protected-access
|
4
4
|
import datetime
|
5
5
|
import io
|
6
6
|
import logging
|
7
|
-
import time
|
8
7
|
import urllib.parse
|
9
8
|
|
9
|
+
import dateutil
|
10
10
|
import pandas as pd
|
11
11
|
import pytest_is_running
|
12
12
|
import requests_cache
|
@@ -30,18 +30,25 @@ def _create_sportsreference_game_model(
|
|
30
30
|
# pylint: disable=too-many-branches
|
31
31
|
response = session.get(url)
|
32
32
|
response.raise_for_status()
|
33
|
-
if not response.from_cache:
|
34
|
-
time.sleep(6.0)
|
35
33
|
soup = BeautifulSoup(response.text, "html.parser")
|
36
34
|
scorebox_meta_div = soup.find("div", class_="scorebox_meta")
|
37
35
|
if not isinstance(scorebox_meta_div, Tag):
|
38
36
|
raise ValueError("scorebox_meta_div is not a Tag.")
|
39
37
|
|
40
38
|
in_divs = scorebox_meta_div.find_all("div")
|
41
|
-
|
39
|
+
current_in_div_idx = 0
|
40
|
+
in_div = in_divs[current_in_div_idx]
|
42
41
|
in_div_text = in_div.get_text().strip()
|
43
|
-
|
44
|
-
|
42
|
+
current_in_div_idx += 1
|
43
|
+
if "Tournament" in in_div_text:
|
44
|
+
in_div_text = in_divs[1].get_text().strip()
|
45
|
+
current_in_div_idx += 1
|
46
|
+
try:
|
47
|
+
dt = parse(in_div_text)
|
48
|
+
except dateutil.parser._parser.ParserError as exc: # type: ignore
|
49
|
+
logging.error("Failed to parse date for URL: %s", url)
|
50
|
+
raise exc
|
51
|
+
venue_div = in_divs[current_in_div_idx]
|
45
52
|
venue_name = venue_div.get_text().strip()
|
46
53
|
scorebox_div = soup.find("div", class_="scorebox")
|
47
54
|
if not isinstance(scorebox_div, Tag):
|
@@ -64,6 +71,7 @@ def _create_sportsreference_game_model(
|
|
64
71
|
fg = {}
|
65
72
|
fga = {}
|
66
73
|
offensive_rebounds = {}
|
74
|
+
assists = {}
|
67
75
|
for df in dfs:
|
68
76
|
if df.index.nlevels > 1:
|
69
77
|
df.columns = df.columns.get_level_values(1)
|
@@ -81,6 +89,10 @@ def _create_sportsreference_game_model(
|
|
81
89
|
orebs = df["OREB"].tolist()
|
82
90
|
for idx, player in enumerate(players):
|
83
91
|
offensive_rebounds[player] = orebs[idx]
|
92
|
+
if "AST" in df.columns.values:
|
93
|
+
asts = df["AST"].tolist()
|
94
|
+
for idx, player in enumerate(players):
|
95
|
+
assists[player] = asts[idx]
|
84
96
|
|
85
97
|
teams: list[TeamModel] = []
|
86
98
|
for a in scorebox_div.find_all("a"):
|
@@ -97,6 +109,7 @@ def _create_sportsreference_game_model(
|
|
97
109
|
fg,
|
98
110
|
fga,
|
99
111
|
offensive_rebounds,
|
112
|
+
assists,
|
100
113
|
)
|
101
114
|
)
|
102
115
|
|
@@ -185,6 +198,7 @@ def _create_sportsreference_game_model(
|
|
185
198
|
end_dt=None,
|
186
199
|
attendance=None,
|
187
200
|
postponed=None,
|
201
|
+
play_off=None,
|
188
202
|
)
|
189
203
|
|
190
204
|
|