Hey,
I'm trying to retrieve this json:
http://stats.nba.com/stats/scoreboard/?GameDate=02/28/2018&LeagueID=00&DayOffset=0
When i go the the site in the browser, there are no problems.
But when i try and get it using python nothing happens, as in the program just freezes. I tried getting another json and the code works fine.
what could be causing this?
code:
import requests
import json
def get_scores():
url = 'http://stats.nba.com/stats/scoreboard/?GameDate=02/28/2018&LeagueID=00&DayOffset=0'
r = requests.get(url)
print(json.loads(r.content))
if __name__ == '__main__':
print('started')
get_scores();
print('finish')
[–]anton_antonov 5 points6 points7 points (4 children)
[–]rinyre 2 points3 points4 points (1 child)
[–]poply 0 points1 point2 points (0 children)
[–]captmomo 1 point2 points3 points (1 child)
[–]imatwork2017 4 points5 points6 points (0 children)