Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPlay Nordic #7515

Closed
MrBrax opened this issue Nov 16, 2015 · 10 comments
Closed

DPlay Nordic #7515

MrBrax opened this issue Nov 16, 2015 · 10 comments

Comments

@MrBrax
Copy link

@MrBrax MrBrax commented Nov 16, 2015

Discovery united all their channels on one domain in October, and e.g. kanal5play does not work anymore.
The new site is riddled with sessions, cookies, and stream requests, which is a pain to handle.

I've tried making a downloader myself, but i'm just not good enough at it to make it work.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 16, 2015

@MrBrax
Copy link
Author

@MrBrax MrBrax commented Nov 16, 2015

Sorry, missed that.

Base URL's do not contain any video id's:
http://www.dplay.se/nugammalt-77-handelser-som-format-sverige/season-1-svensken-lar-sig-njuta-av-livet/

The ID is on the page in multiple locations. It then does a GET request to here:
https://secure.dplay.se/secure/api/v2/user/authorization/stream/ID?stream_type=hls
Where it returns the stream URL. The cookies dsc-geo and alid need their contents set from the HLS playlist request.

@MrBrax
Copy link
Author

@MrBrax MrBrax commented Nov 17, 2015

svtplay-dl apparently handles dplay already: https://github.com/spaam/svtplay-dl/blob/master/lib/svtplay_dl/service/dplay.py

I don't know about stealing code or whatever.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 17, 2015

svtplay-dl apparently handles dplay already: https://github.com/spaam/svtplay-dl/blob/master/lib/svtplay_dl/service/dplay.py

I don't know about stealing code or whatever.

Its MIT license is incompatible with the public domain license of youtube-dl, therefore it can't be copied (I'm not a lawyer, but I think you also can't inspect the code and then write your own version for youtube-dl).

@MrBrax
Copy link
Author

@MrBrax MrBrax commented Nov 17, 2015

Well the method has to be the same at least, so that can't really be avoided.

@jaimeMF jaimeMF closed this in 4cd759f Nov 17, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 17, 2015

I have added support. Since downloading the hds streams requires some cookies that I haven't figured out, I used the hsl stream instead.

@MrBrax
Copy link
Author

@MrBrax MrBrax commented Nov 17, 2015

The cookies required are:
dsc-geo: {"countryCode":"SE","expiry": (timestamp) }
alid: gotten from the m3u8 playlist manifest link, in the headers

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 17, 2015

I can't get it to work, feel free to open a PR.

@MrBrax
Copy link
Author

@MrBrax MrBrax commented Nov 18, 2015

I probably confused the two. HLS should work anyway yeah?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 18, 2015

I probably confused the two. HLS should work anyway yeah?

It works in the videos I have tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.