diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py index ae7079a6a..8f8bed523 100644 --- a/youtube_dl/extractor/extractors.py +++ b/youtube_dl/extractor/extractors.py @@ -670,7 +670,6 @@ from .myvi import ( from .myvidster import MyVidsterIE from .nationalgeographic import ( NationalGeographicVideoIE, - NationalGeographicTVIE, ) from .naver import NaverIE from .nba import NBAIE diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py index 03cfba91f..8b114cdde 100644 --- a/youtube_dl/extractor/go.py +++ b/youtube_dl/extractor/go.py @@ -38,13 +38,17 @@ class GoIE(AdobePassIE): 'disneynow': { 'brand': '011', 'resource_id': 'Disney', + }, + 'nationalgeographic': { + 'brand': '026', + 'requestor_id': 'dtci', } } _VALID_URL = r'''(?x) https?:// (?: (?:(?P%s)\.)?go| - (?Pabc|freeform|disneynow) + (?:www\.)?(?Pabc|freeform|disneynow|nationalgeographic) )\.com/ (?: (?:[^/]+/)*(?P[Vv][Dd][Kk][Aa]\w+)| @@ -99,6 +103,19 @@ class GoIE(AdobePassIE): # m3u8 download 'skip_download': True, }, + }, { + 'url': 'https://www.nationalgeographic.com/tv/shows/live-free-or-die/episode-guide/season-01/episode-05-butchers-and-builders/vdka10914748', + 'info_dict': { + 'id': 'VDKA10914748', + 'ext': 'mp4', + 'title': 'Butchers and Builders', + 'description': 'md5:25b8b04d5c21fbed3644c0c17c3a41df', + }, + 'params': { + 'geo_bypass_ip_block': '3.244.239.0/24', + # m3u8 download + 'skip_download': True, + }, }, { 'url': 'http://abc.go.com/shows/the-catch/episode-guide/season-01/10-the-wedding', 'only_matching': True, diff --git a/youtube_dl/extractor/nationalgeographic.py b/youtube_dl/extractor/nationalgeographic.py index ee12e2b47..165964ca0 100644 --- a/youtube_dl/extractor/nationalgeographic.py +++ b/youtube_dl/extractor/nationalgeographic.py @@ -1,7 +1,6 @@ from __future__ import unicode_literals from .common import InfoExtractor -from .fox import FOXIE from ..utils import ( smuggle_url, url_basename, @@ -59,24 +58,3 @@ class NationalGeographicVideoIE(InfoExtractor): {'force_smil_url': True}), 'id': guid, } - - -class NationalGeographicTVIE(FOXIE): - _VALID_URL = r'https?://(?:www\.)?nationalgeographic\.com/tv/watch/(?P[\da-fA-F]+)' - _TESTS = [{ - 'url': 'https://www.nationalgeographic.com/tv/watch/6a875e6e734b479beda26438c9f21138/', - 'info_dict': { - 'id': '6a875e6e734b479beda26438c9f21138', - 'ext': 'mp4', - 'title': 'Why Nat Geo? Valley of the Boom', - 'description': 'The lives of prominent figures in the tech world, including their friendships, rivalries, victories and failures.', - 'timestamp': 1542662458, - 'upload_date': '20181119', - 'age_limit': 14, - }, - 'params': { - 'skip_download': True, - }, - }] - _HOME_PAGE_URL = 'https://www.nationalgeographic.com/tv/' - _API_KEY = '238bb0a0c2aba67922c48709ce0c06fd'