nesticot commited on
Commit
e46bfe7
·
verified ·
1 Parent(s): f69ccd8

Update api_scraper.py

Browse files
Files changed (1) hide show
  1. api_scraper.py +1 -1
api_scraper.py CHANGED
@@ -873,7 +873,7 @@ class MLB_Scrape:
873
 
874
  game_type_str = ','.join([str(x) for x in game_type])
875
 
876
- if game_type_str = 'S':
877
  player_data_1 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{1}/players?season={season}&gameType=[{game_type_str}]').json()
878
  player_data_2 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{11}/players?season={season}&gameType=[{game_type_str}]').json()
879
  player_data_3 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{12}/players?season={season}&gameType=[{game_type_str}]').json()
 
873
 
874
  game_type_str = ','.join([str(x) for x in game_type])
875
 
876
+ if game_type_str == 'S':
877
  player_data_1 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{1}/players?season={season}&gameType=[{game_type_str}]').json()
878
  player_data_2 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{11}/players?season={season}&gameType=[{game_type_str}]').json()
879
  player_data_3 = requests.get(url=f'https://statsapi.mlb.com/api/v1/sports/{12}/players?season={season}&gameType=[{game_type_str}]').json()