mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-23 12:40:11 +09:00
[go] Add site info for disneynow (closes #21613)
This commit is contained in:
parent
5ae9b8b3a3
commit
a30c2f4055
@ -34,9 +34,13 @@ class GoIE(AdobePassIE):
|
|||||||
'watchdisneyxd': {
|
'watchdisneyxd': {
|
||||||
'brand': '009',
|
'brand': '009',
|
||||||
'resource_id': 'DisneyXD',
|
'resource_id': 'DisneyXD',
|
||||||
|
},
|
||||||
|
'disneynow': {
|
||||||
|
'brand': '011',
|
||||||
|
'resource_id': 'Disney',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_VALID_URL = r'https?://(?:(?:(?P<sub_domain>%s)\.)?go|disneynow)\.com/(?:(?:[^/]+/)*(?P<id>vdka\w+)|(?:[^/]+/)*(?P<display_id>[^/?#]+))'\
|
_VALID_URL = r'https?://(?:(?:(?P<sub_domain>%s)\.)?go|(?P<sub_domain_2>disneynow))\.com/(?:(?:[^/]+/)*(?P<id>vdka\w+)|(?:[^/]+/)*(?P<display_id>[^/?#]+))'\
|
||||||
% '|'.join(list(_SITE_INFO.keys()) + ['disneynow'])
|
% '|'.join(list(_SITE_INFO.keys()) + ['disneynow'])
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://abc.go.com/shows/designated-survivor/video/most-recent/VDKA3807643',
|
'url': 'http://abc.go.com/shows/designated-survivor/video/most-recent/VDKA3807643',
|
||||||
@ -83,7 +87,9 @@ class GoIE(AdobePassIE):
|
|||||||
display_id)['video']
|
display_id)['video']
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
sub_domain, video_id, display_id = re.match(self._VALID_URL, url).groups()
|
mobj = re.match(self._VALID_URL, url)
|
||||||
|
sub_domain = mobj.group('sub_domain') or mobj.group('sub_domain_2')
|
||||||
|
video_id, display_id = mobj.group('id', 'display_id')
|
||||||
site_info = self._SITE_INFO.get(sub_domain, {})
|
site_info = self._SITE_INFO.get(sub_domain, {})
|
||||||
brand = site_info.get('brand')
|
brand = site_info.get('brand')
|
||||||
if not video_id or not site_info:
|
if not video_id or not site_info:
|
||||||
|
Loading…
Reference in New Issue
Block a user