youtube-dl: National Geographic url not recognized / [generic] / Unsupported URL
Checklist
- I’m reporting a broken site support
- I’ve verified that I’m running youtube-dl version 2019.10.22
- I’ve checked that all provided URLs are alive and playable in a browser
- I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
- I’ve searched the bugtracker for similar issues including closed ones
Verbose log
E:\USER\temp_ytdl>youtube-dl.exe --all-subs --cookies cookies.txt --verbose "htt
ps://www.nationalgeographic.com/tv/shows/dr-t-lone-star-vet/episode-guide/season
-01/episode-02-mother-of-dragons/vdka13590590"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--all-subs', '--cookies', 'cookies.txt', '--verbose
', 'https://www.nationalgeographic.com/tv/shows/dr-t-lone-star-vet/episode-guide
/season-01/episode-02-mother-of-dragons/vdka13590590']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2019.10.22
[debug] Python version 3.4.4 (CPython) - Windows-2008ServerR2-6.1.7601-SP1
[debug] exe versions: ffmpeg 4.1.3, ffprobe N-89595-g40d4b13228, rtmpdump 2.4-20
151223-gfa8646d-OpenSSL_1.0.2n-x86_64-static
[debug] Proxy map: {}
[generic] vdka13590590: Requesting header
WARNING: Falling back on generic information extractor.
[generic] vdka13590590: Downloading webpage
[generic] vdka13590590: Extracting information
ERROR: Unsupported URL: https://www.nationalgeographic.com/tv/shows/dr-t-lone-st
ar-vet/episode-guide/season-01/episode-02-mother-of-dragons/vdka13590590
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy
0p\build\youtube_dl\YoutubeDL.py", line 796, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy
0p\build\youtube_dl\extractor\common.py", line 530, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpifszpy
0p\build\youtube_dl\extractor\generic.py", line 3353, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.nationalgeograph
ic.com/tv/shows/dr-t-lone-star-vet/episode-guide/season-01/episode-02-mother-of-
dragons/vdka13590590
Description
My understanding is National Geographic is supported. This was reported in January, but it was immediately closed as “Duplicate” and I cannot find what it’s a duplicate of. It appears to be the same issue. I was therefor unable to find if there is any kind of workaround.
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 3
- Comments: 15 (1 by maintainers)
@JamKage, any progress on the National Geographic #26785? It’s still not able to be downloaded by YouTube-dl; as it was flagged to have “conflicts that must be resolved” before it is the “PR is merged” as well. Your assistance on it will be very much appreciated, just as the Fxnetworks that is now running fine. Thanks.
I managed to get this working with the following patch:
Add the following brand to the
_SITE_INFOdictionary in go.py:And replace the following line:
With:
Actually since my comment, thanks to this commit by @dstftw, the third step is no longer needed.
Using this episode as the example though, looks like one needs to:
Add two brands to the dictionary or whatever it’s called in go.py. Between lines 40-41, paste the following:
Note: I don’t know which of the two are actually needed now.
Then, on the line reading (?P<sub_domain_2>, add |nationalgeographic to it.
There’s an issue with retrieving the video ID in the code, but I haven’t looked at the logic for that yet. Assume it’s because they once again changed the layout to something like: “videoIdCode”:“vdka15374108” which probably hasn’t been accounted for.
This looks identical to the scheme used on Disney’s Go platform. I’m sure adding yet another brand to it is relatively trivial—I may give it a shot myself to see if it’s doable, as I amateurishly fixed a related issue, but as I’m not actually putting a pull request in, who knows how long the fix will take to be put into an official release.
Update: Yep, just as trivial as I expected, though looks as if the Adobe pass credentials break for me, but it should get you started. What I did:
_VALID_URL = r'https?://(?:www\.)?(?:(?:(?P<sub_domain>%s)(?:\.go)?)?|(?P<sub_domain_2>disneynow))\.com/(?:(?:[^/]+/)*(?P<id>vdka\w+)|(?:[^/]+/)*(?P<display_id>[^/?#]+))'\r'"id":["\']*(VDKA\w+)', webpage, 'video id',