caseyfw / nhldl

A shell script for downloading NHL.tv streams.
MIT License
23 stars 4 forks source link

Update nhldl.sh #1

Closed cmaxwe closed 8 years ago

cmaxwe commented 8 years ago

gotsta have the cookies now brah

caseyfw commented 8 years ago

But you don't need the cookies to download the stream files or the video file segments... Or at least, I certainly don't.

Try opening these in an incognito browser window (i.e. without any saved cookies):

Master M3U8 file: http://hlslive-akc.med2.med.nhl.com/ls04/nhl/2016/03/29/NHL_GAME_VIDEO_DETMTL_M2_HOME_20160329/master_wired_web.m3u8

Index TS file: http://hlslive-akc.med2.med.nhl.com/ls04/nhl/2016/03/29/NHL_GAME_VIDEO_DETMTL_M2_HOME_20160329/2500K/2500_complete-trimmed.m3u8

Individual video segment: http://hlslive-akc.med2.med.nhl.com/ls04/nhl/2016/03/29/NHL_GAME_VIDEO_DETMTL_M2_HOME_20160329/2500K/23/31/07.ts

cmaxwe commented 8 years ago

Odd... I needed them for yesterdays games (tried Wash/Philly & TB/TOR both)

Maybe it hasn't been rolled out across the entire CDN yet?

Or maybe they rolled it out and have since reversed it?

Or maybe it only impacts games from yesterday onwards? (not likely)

Agree that the URL's you posted work fine without cookies... I am at work and don't have the URL's I used last night but I assure you that it didn't work without cookies and with cookies it worked fine for those games.

cmaxwe commented 8 years ago

Seems to be working without cookies now... so odd.

They must have been testing something.

caseyfw commented 8 years ago

Hey, so turns out you were spot on! They were testing something, and now cookies are required to download anything from the servers hosting the stream files.

Thanks for the PR!

cmaxwe commented 8 years ago

Cool...glad you ended up being able to use it.

I ended up writing something similar in Python that does a bunch of different stuff...

Will put it up on github over the weekend and send you a note.

caseyfw commented 8 years ago

Hey @cmaxwe - have you uploaded your Python script yet? I'm keen to see how the login works!

cmaxwe commented 8 years ago

No I didn't... Anzac long weekend and didn't get time.

Will try to make some time either tonight or tomorrow night. :+1:

cmaxwe commented 8 years ago

https://github.com/cmaxwe/dl-nhltv

Uploaded it. Take a look and let me know what you think.

I had a bunch of 403 and 504 errors on todays Blackhawks game. I think I tried to download it too soon after it was done and/or they implemented something to stop me from killing their servers with 25 simultaneous downloads.

Reduced the amount of simultaneous downloads to 10 and increased the time to wait for the files to propagate from 10min to 15min. Hopefully that will fix it.

leemalk21 commented 8 years ago

Hi, I'm basically brand new to shell scripts and am trying to run this. I've got the URL of the game, but I'm not sure which parts of the script I am supposed to edit. Do you have an example of what a full script looks like just so I can compare? Or is there any other guidance on this? Thanks so much!

caseyfw commented 8 years ago

@leemalk21 this issue is probably not the place to ask for help on using the script, but I suppose we've already wandered away from the original issue.

You shouldn't need to edit the script at all. All you need is the URL of the m3u8 index file and some cookies from your browser.