mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 11:31:29 +01:00
[ie/abc.net.au:iview:showseries] Fix extraction (#11101)
Closes #10475 Authored by: bashonly
This commit is contained in:
parent
eabb4680fd
commit
7f909046f4
|
@ -387,17 +387,27 @@ class ABCIViewShowSeriesIE(InfoExtractor):
|
||||||
'thumbnail': r're:^https?://cdn\.iview\.abc\.net\.au/thumbs/.*\.jpg$',
|
'thumbnail': r're:^https?://cdn\.iview\.abc\.net\.au/thumbs/.*\.jpg$',
|
||||||
},
|
},
|
||||||
'playlist_count': 15,
|
'playlist_count': 15,
|
||||||
|
'skip': 'This program is not currently available in ABC iview',
|
||||||
|
}, {
|
||||||
|
'url': 'https://iview.abc.net.au/show/inbestigators',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '175343-1',
|
||||||
|
'title': 'Series 1',
|
||||||
|
'description': 'md5:b9976935a6450e5b78ce2a940a755685',
|
||||||
|
'series': 'The Inbestigators',
|
||||||
|
'season': 'Series 1',
|
||||||
|
'thumbnail': r're:^https?://cdn\.iview\.abc\.net\.au/thumbs/.+\.jpg',
|
||||||
|
},
|
||||||
|
'playlist_count': 17,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
show_id = self._match_id(url)
|
show_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, show_id)
|
webpage = self._download_webpage(url, show_id)
|
||||||
webpage_data = self._search_regex(
|
video_data = self._search_json(
|
||||||
r'window\.__INITIAL_STATE__\s*=\s*[\'"](.+?)[\'"]\s*;',
|
r'window\.__INITIAL_STATE__\s*=\s*[\'"]', webpage, 'initial state', show_id,
|
||||||
webpage, 'initial state')
|
transform_source=lambda x: x.encode().decode('unicode_escape'),
|
||||||
video_data = self._parse_json(
|
end_pattern=r'[\'"]\s*;')['route']['pageData']['_embedded']
|
||||||
unescapeHTML(webpage_data).encode().decode('unicode_escape'), show_id)
|
|
||||||
video_data = video_data['route']['pageData']['_embedded']
|
|
||||||
|
|
||||||
highlight = try_get(video_data, lambda x: x['highlightVideo']['shareUrl'])
|
highlight = try_get(video_data, lambda x: x['highlightVideo']['shareUrl'])
|
||||||
if not self._yes_playlist(show_id, bool(highlight), video_label='highlight video'):
|
if not self._yes_playlist(show_id, bool(highlight), video_label='highlight video'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user