2014-10-11, 02:08
(2014-10-11, 01:56)timewasted Wrote: Ok, now that a game is actually streaming live, I have a better view of what's going on. I'm going to omit the majority of the responses, since it seems access controls are actually somewhat lax (at least for non-live games).
First, you get a list of games:
Code:POST to http://gamecenter.nhl.com/nhlgc/servlets/games
Cookies: none
Parameters:
format: xml
app: true
Important tags in XML response:
<season>
<type>
<gid>
From there, you can pull up an individual game:
Code:POST to http://gamecenter.nhl.com/nhlgc/servlets/game
Cookies: none
Parameters:
season: <season>
type: <type>
app: true
gid: <gid>
isFlex: true
Important tags in XML response:
<season>
<type>
<gid>
Then you look up the game's publish point:
Code:POST to http://gamecenter.nhl.com/nhlgc/servlets/publishpoint
Cookies: authenticated login cookies
Parameters:
type: game
gs: live
id: <season><type (with leading zero)><gid>
ft: <type> (I think)
Now comes the fun part... the realization that the stream is encrypted. I'm sure that Python has methods to decrypt the stream, but it's at this point that the addon would enter a legally grey area. I'll look a bit more, but at this point the outlook doesn't seem great for live streaming.
The key for streaming is is linked in the m3u8 file presented by NHLGC. Last season the only criteria to retrieve it was you had to have the proper useragent. I am not sure if that is changed as I have not tested it. But if you are able to get m3u8 links, then you should see the url to the AES-128 key file linked inside.. (which xbmc supports using and has been in place for a while)
Edit: I think you also needed to have a cookie set as well.