Closed socphoenix closed 1 year ago
This one is going to get a bit complicated. we will need the gamePK to get the content. They don't post goals in real-time on this, and the volume of media seems to be getting smaller the closer to present I'm getting. It can however get the highlights of the game.
using:
- recap = requests.get("https://statsapi.web.nhl.com/api/v1/game/" + str(gamePK) + "/content")
- recap = recap.json()
- recap.get("media").get("epg")[2].get("items")[0].get("playbacks")[3].get("url")
might need to move the gameOver check in post_body linescore in order to add this to the post body at the end of the game.
Overall status:
- [x] Create recap link on game, possibly with a few minutes of delay to make sure the media is live
- [x] look for api that can give live goal videos, if one exists.
Recap will try five minutes after the game. if recap isn't available, will wait 60 seconds and try again.
Found the highlights in the nhl api, added to post body at the end.
This one is going to get a bit complicated. we will need the gamePK to get the content. They don't post goals in real-time on this, and the volume of media seems to be getting smaller the closer to present I'm getting. It can however get the highlights of the game.
using:
might need to move the gameOver check in post_body linescore in order to add this to the post body at the end of the game.
Overall status: