-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Discovery + How to download using new format? #28160
Comments
I'm not sure if the extractor is working for discoveryplus.co.uk, but at least I can confirm it is not working for discoveryplus.com What is working for me in the US site and will probably work for you too, if you start playing the episode you want to download and open the browser Network tool (command+option+e on Firefox/mac) you can write 'm3u' in the filter field, and you will see several hits as Copy the link for one of those results and pass it to youtube-dl like this: If you want an easier way to get a whole season or a whole show, I haven't found it yet. Let me know if this method works for you. |
The only thread for this is locked to contributers currently, but I'd like to supply any dev with the time to implement this, my credentials to login to discoveryplus.com |
@ohmybahgosh you can contact me via email address in my profile. |
Just emailed the credentials |
Thanks so much for adding discoveryplus.com I didn't sign up for an account yet so I can't test it, but can the extractor use username/password or does it use cookies? |
I always used cookies, never got it to work with user/pass but I haven't tried the latest commit yet so I can't be 100% sure. Edit: just tested the last commit and you definitely has to pass the cookies, username/password are not suported. I did observed that for some reason is downloading episodes with ads while if I play the episode in the browser I get no ads. |
I have the subscription with ads and when I downloaded episodes the downloaded files did not have ads. |
When I extract the m3u manually as I described before the downloads have no ads either. For some reason the extractor is getting a stream with ads even with the correct cookies. |
I supplied @remitamine with my credentials, and those credentials were for a premium subscription. So if you do not have a premium subscription you should ask @remitamine if you can send over your free account credentials. Back to the inclusion via this update, everything works great on my end via a premium sub! Just remember to use a Netscape cookie and make sure you include cookie data from not just www.discoveryplus.com but the root domain as well discoveryplus.com |
We already figured it out, the venv where I was testing the code didn't had the PyCrypto package so youtube-dl was delegating the download to ffmpeg. |
@Diegus83 solution almost works for discoveryplus.it. Example link: https://www.discoveryplus.it/programmi/fratelli-di-crozza Anyway, not providing single pages for each episode is the webdesign equivalent of hostile architecture. It's like they've got a fully staffed Banality of Evil Department for thinking such horrors, or something like that |
In the US site they don’t a page with episode information but when you click in one it does loads in it’s own URL like this https://www.discoveryplus.com/video/mythbusters/poppy-seed-drug-test If you know how to run from the source code you can download the current repository and test the new extractor for discovery. |
@Diegus83 I can't see your link: it's geografically locked, it redirects to discoveryplus.it for me. Hoping to help devs from abroad, here some data. Example: Response payload:
Headers:
Security:
|
@Diegus83 I can git clone but I'm at loss for extracting a single episode with this new discoveryplus site, I will help if you will point me to some instructions |
Makes sense, I wanted to get an episode off the Discovery UK website and it is the same situation. When I pass your m3u8 URL to youtube-dl I can see the download starts but it only shows information for the video
But if I pass it directly to ffmpeg like this
It finds 6 different programs with audio/video like this:
I checked a couple minutes and it had audio and didn't had an ad at the beginning.
I don't know what platform you are in, this link has instructions that will work in linux/mac, but you may be able to adapt them if you are in windows Basically once you have you local clone, move to the youtube-dl directory with your command line, and you can run it as a module with
Note the "_" in the name, that is the name of the actual directory in the repository that contains all the python scripts. |
The good news is that the url with Yes I'm on linux. I've followed the guide, with
In a browser, the example link in the My problem is that there are no more https://www.discoveryplus.it/program/$program_name/$episode_name urls. The layout of discoveryplus.co.uk seems identical to discoveryplus.it, I can go to the website, but I need to be in the UK or Ireland to subscribe otherwise I can't watch even free episodes. discoveryplus.com just redirects to discoveryplus.it, so it's more undiscoverable than the British version, the irony |
I can report that discoveryplus.dk has the same new layout - there are no episode-specific url's anymore. Downloading the So it's workable.. But as mentioned, the extractor doesn't work - although for this show there aren't any subtitles or anything extra.. :P |
[a bit offtopic comment] Kodi is a free software and open source media center (different from Plex, a personal streaming server & client solution). For the cheapest and easiest alternative for novices, install it on your Windows or macOS computer, connect TV with an HDMI cable, set kodi to open on a second display (on Settings -> System -> Display -> Display mode), boom done. |
I wonder if maybe the are loading the episodes in a frame but that seems unlikely, I think frames are no longer popular in web design. If you hover over the button or image that starts the episode is there any sort of link that you can copy? Maybe that can trigger the loading of the m3u8 and then it can be extracted. Just spitballing here. |
No, no hover links. I've checked: the playlist.m3u8 appears in the Network tab 2 seconds after I click on an episode. In my case, only on free episodes, no m3u8 file appears if I click on paid ones. The aforementioned kodi plugin has some working extractors in python, but depends on the Inputstream Adaptive plugin for Kodi. For what I see most streamable websites on Kodi have plugins based on this library. Should youtube_dl adapt that to its needs and join forces with them is probably a major dev decision that I can't suggest because it's too big. CORRECTION: maybe it's used only for playing content from urls, but every plugin has to pass correct urls. |
No iframes. Checked for that. |
@remitamine I set the password back to the one you have from me if you need it for testing |
@ohmybahgosh is there a new problem with support for discoveryplus.com? |
does this work with www.discoveryplus.es? |
I updated to the latest release today and I'm experiencing the same problem of the episodes downloading with the pre roll ads incldued. What I did is remove the previous version with brew and install the new one
Looking at the last line in the log I think the problem is the same I had when testing the PR. I have pyenv installed in my system and I think that is causing youtube-dl not to run the appropriate version of python and not finding the required dependencies. Is there a way to know o select which version of python youtube-dl is using? I have 2.7 that comes with the OS, 3.9.2 was installed by brew when I installed youtube-dl and I'm globally using 3.9.1 via pyenv. I have tried installing pycrypto via /usr/local/bin/pip3.9 (the brew path) and via the pyenv version but still experiencing the same issue. Edit: Looking at the verbose log it seems to be running the python install from brew. Should not all the required packages be available then?
|
Ok, I tried that commit a couple ways and both worked (no ads). I'm still convinced brew, pyenv and youtube-dl are not a good combo. I installed the 2021.02.22 using pip instead of brew and everything works as expected. Running it from the repository:
I also tried adding the modified dplay.py to the latest version available via brew in ./Cellar/youtube-dl/2021.2.22/libexec/lib/python3.9/site-packages/youtube_dl/extractor/
|
is there any workaround for the latest youtube-dl? |
The extractor works fine in the latest version. The video you are trying to download does not have a hls-3280 format.
Use one of the formats available and it works fine. |
mmm ok but how to get the exactly link for the some tv show? and youtube-dl say this: youtube_dl.utils.UnsupportedError: Unsupported URL: |
The extractor does not work for discoveryplus.it, see above comments on how to workaround by getting the m3u8. The extractor works for discoveryplus.com. |
You are trying to pass an entire show, you need to pass the individual episodes. |
Ok i did but unfortunately m3u8 has been decrypted: https://dplaysouth-vod.akamaized.net/dplaydni/169249/0/hls/9844245004/exp=1616324137~acl=%2f*~data=hdntl~hmac=501c49fbd0564aa5589a72332 |
That’s an authentication error and has nothing to do with encryption. Are you passing cookies to YouTube-dl? |
yes with cookie.txt. I exported it using Get cookies.txt extension from chrome. |
Can you post the complete command you are using and the output from youtube-dl? |
python -m youtube_dl --cookies cookies.txt --verbose https://dplaysouth-vod.akamaized.net/dplaydni/169249/0/hls/9844245004/exp=1616324137~acl=%2f*~data=hdntl~hmac=501c49fbd0564aa5589a723321bfdc9a5a27935bdff7de9691858a7d171c0a36/995756510-prog_index.m3u8?version_hash=38d5caf4 -F |
First thing I would try is log out and back in of Discovery in Google Chrome, export a fresh set of cookies and try again. Edit: Have you tried any of the other m3u8 URLs that show up in the Network tab? Your URL looks different from the ones I have encountered before. |
This appears to have stopped working recently. Now when I try to download from discoveryplus.com, I'm getting the error |
Maybe it depends on the show? I just tried again and it worked fine.
|
I won't be surprised if newer shows are using encryption to make them harder to rip. |
It's working now. I first tried the video page URL I tried your example and it worked, so decided to try again with my video page URL and it is working now! I have no explanation.
Sorry for the non-issue issue! My Discovery+ account is brand new so perhaps that had something to do with it. |
Hey Guys, I was trying to download videos from The youtube-dl query that I'm using is Would you suggest any other query to download the video in the preferred language. Below is the response that I get from the
Any help would be greatly appreciated. Thanks. |
Sure, no issues. I'll look around for a solution. If something works, I'll post it here. |
Please Help. Looks like this is broken again. I can not find the .m3u8 information anymore. And the command: Returns: |
I encourage any interested subscribers to this issue to review and test PR #32235 where we are looking for valid URLs for DiscoveryPlus (and related sites). |
Checklist
Question
I want to use discovery+ however it isn't as clear to directly download a source due to the url sticking to in my case
https://www.discoveryplus.co.uk/show/chasing-classic-cars but can't find the individual listing of the url.
How do i get the individual listing?
The text was updated successfully, but these errors were encountered: