mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-01-22 01:18:48 +00:00
[extractor/nbc] Fix NBC Olympics extractor
This commit is contained in:
parent
a803582717
commit
e7f4793d4d
@ -495,12 +495,10 @@ class NBCOlympicsStreamIE(AdobePassIE):
|
|||||||
display_id = self._match_id(url)
|
display_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, display_id)
|
webpage = self._download_webpage(url, display_id)
|
||||||
pid = self._search_regex(r'pid\s*=\s*(\d+);', webpage, 'pid')
|
pid = self._search_regex(r'pid\s*=\s*(\d+);', webpage, 'pid')
|
||||||
resource = self._search_regex(
|
|
||||||
r"resource\s*=\s*'(.+)';", webpage,
|
|
||||||
'resource').replace("' + pid + '", pid)
|
|
||||||
event_config = self._download_json(
|
event_config = self._download_json(
|
||||||
self._DATA_URL_TEMPLATE % ('event_config', pid),
|
self._DATA_URL_TEMPLATE % ('event_config', pid),
|
||||||
pid)['eventConfig']
|
pid)['eventConfig']
|
||||||
|
resource = event_config.get('resourceId', 'NBCOlympics')
|
||||||
title = self._live_title(event_config['eventTitle'])
|
title = self._live_title(event_config['eventTitle'])
|
||||||
source_url = self._download_json(
|
source_url = self._download_json(
|
||||||
self._DATA_URL_TEMPLATE % ('live_sources', pid),
|
self._DATA_URL_TEMPLATE % ('live_sources', pid),
|
||||||
|
Loading…
Reference in New Issue
Block a user