mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-22 16:44:32 +01:00
[go] Added support for www.nationalgeographic.com
This commit is contained in:
parent
d65d89183f
commit
a2936a6d49
@ -670,7 +670,6 @@ from .myvi import (
|
|||||||
from .myvidster import MyVidsterIE
|
from .myvidster import MyVidsterIE
|
||||||
from .nationalgeographic import (
|
from .nationalgeographic import (
|
||||||
NationalGeographicVideoIE,
|
NationalGeographicVideoIE,
|
||||||
NationalGeographicTVIE,
|
|
||||||
)
|
)
|
||||||
from .naver import NaverIE
|
from .naver import NaverIE
|
||||||
from .nba import NBAIE
|
from .nba import NBAIE
|
||||||
|
@ -38,13 +38,17 @@ class GoIE(AdobePassIE):
|
|||||||
'disneynow': {
|
'disneynow': {
|
||||||
'brand': '011',
|
'brand': '011',
|
||||||
'resource_id': 'Disney',
|
'resource_id': 'Disney',
|
||||||
|
},
|
||||||
|
'nationalgeographic': {
|
||||||
|
'brand': '026',
|
||||||
|
'requestor_id': 'dtci',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_VALID_URL = r'''(?x)
|
_VALID_URL = r'''(?x)
|
||||||
https?://
|
https?://
|
||||||
(?:
|
(?:
|
||||||
(?:(?P<sub_domain>%s)\.)?go|
|
(?:(?P<sub_domain>%s)\.)?go|
|
||||||
(?P<sub_domain_2>abc|freeform|disneynow)
|
(?:www\.)?(?P<sub_domain_2>abc|freeform|disneynow|nationalgeographic)
|
||||||
)\.com/
|
)\.com/
|
||||||
(?:
|
(?:
|
||||||
(?:[^/]+/)*(?P<id>[Vv][Dd][Kk][Aa]\w+)|
|
(?:[^/]+/)*(?P<id>[Vv][Dd][Kk][Aa]\w+)|
|
||||||
@ -99,6 +103,19 @@ class GoIE(AdobePassIE):
|
|||||||
# m3u8 download
|
# m3u8 download
|
||||||
'skip_download': True,
|
'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',
|
'url': 'http://abc.go.com/shows/the-catch/episode-guide/season-01/10-the-wedding',
|
||||||
'only_matching': True,
|
'only_matching': True,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from .fox import FOXIE
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
smuggle_url,
|
smuggle_url,
|
||||||
url_basename,
|
url_basename,
|
||||||
@ -59,24 +58,3 @@ class NationalGeographicVideoIE(InfoExtractor):
|
|||||||
{'force_smil_url': True}),
|
{'force_smil_url': True}),
|
||||||
'id': guid,
|
'id': guid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class NationalGeographicTVIE(FOXIE):
|
|
||||||
_VALID_URL = r'https?://(?:www\.)?nationalgeographic\.com/tv/watch/(?P<id>[\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'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user