diff --git a/pybaseball/lahman.py b/pybaseball/lahman.py index 437096eb..5a9a04cf 100644 --- a/pybaseball/lahman.py +++ b/pybaseball/lahman.py @@ -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 @@ -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") diff --git a/pybaseball/team_results.py b/pybaseball/team_results.py index 6e7c44ce..b4e802f8 100644 --- a/pybaseball/team_results.py +++ b/pybaseball/team_results.py @@ -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")