Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions pybaseball/lahman.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from . import cache

url = "https://github.com/chadwickbureau/baseballdatabank/archive/master.zip"
url = "https://github.com/seanlahman/baseballdatabank/archive/refs/heads/master.zip"
base_string = "baseballdatabank-master"

_handle = None
Expand Down Expand Up @@ -106,7 +106,11 @@ def master() -> pd.DataFrame:
return people()

def people() -> pd.DataFrame:
return _get_file("core/People.csv")
# Try new naming first (People.csv), fallback to old naming (Master.csv)
try:
return _get_file("core/People.csv")
except (FileNotFoundError, KeyError):
return _get_file("core/Master.csv")

def pitching() -> pd.DataFrame:
return _get_file("core/Pitching.csv")
Expand Down
1 change: 0 additions & 1 deletion pybaseball/team_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def get_soup(season: Optional[int], team: str) -> BeautifulSoup:
if season is None:
season = most_recent_season()
url = "https://www.baseball-reference.com/teams/{}/{}-schedule-scores.shtml".format(team, season)
print(url)
s = session.get(url).content
return BeautifulSoup(s, "lxml")

Expand Down
Loading