Jan-27-2022, 06:01 PM
Hello,
I've been working with some open API from ESPN located here:
https://statsapi.web.nhl.com/api/v1/game.../feed/live
as you can see, this is a pretty convoluted json file
I honestly do not know where to start as I have never worked with json files at this magnitude.
I have had a few attempts using this script here:
I've been working with some open API from ESPN located here:
https://statsapi.web.nhl.com/api/v1/game.../feed/live
as you can see, this is a pretty convoluted json file
I honestly do not know where to start as I have never worked with json files at this magnitude.
I have had a few attempts using this script here:
import urllib.request import json with urllib.request.urlopen("https://statsapi.web.nhl.com/api/v1/game/2021020748/feed/live") as url: live = json.loads(url.read().decode()) for type in live['liveData']['plays']:though I don't know how to get from this point. I have tried by using another for loop
for type2 in type['allPlays']; print(type2)