summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/skynewsau.py
diff options
context:
space:
mode:
Diffstat (limited to 'yt_dlp/extractor/skynewsau.py')
-rw-r--r--yt_dlp/extractor/skynewsau.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/yt_dlp/extractor/skynewsau.py b/yt_dlp/extractor/skynewsau.py
index 43a9c82..617738a 100644
--- a/yt_dlp/extractor/skynewsau.py
+++ b/yt_dlp/extractor/skynewsau.py
@@ -22,21 +22,21 @@ class SkyNewsAUIE(InfoExtractor):
'tags': ['fblink', 'msn', 'usa', 'world', 'yt'],
'upload_date': '20211015',
},
- 'params': {'skip_download': True, 'format': 'bv'}
+ 'params': {'skip_download': True, 'format': 'bv'},
}]
_API_KEY = '6krsj3w249nk779d8fukqx9f'
def _real_extract(self, url):
- id = self._match_id(url)
- webpage = self._download_webpage(url, id)
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
embedcode = self._search_regex(r'embedcode\s?=\s?\"([^\"]+)\"', webpage, 'embedcode')
data_json = self._download_json(
- f'https://content.api.news/v3/videos/brightcove/{embedcode}?api_key={self._API_KEY}', id)['content']
+ f'https://content.api.news/v3/videos/brightcove/{embedcode}?api_key={self._API_KEY}', video_id)['content']
return {
- 'id': id,
+ 'id': video_id,
'_type': 'url_transparent',
- 'url': 'https://players.brightcove.net/%s/default_default/index.html?videoId=%s' % tuple(embedcode.split('-')),
+ 'url': 'https://players.brightcove.net/{}/default_default/index.html?videoId={}'.format(*tuple(embedcode.split('-'))),
'ie_key': 'BrightcoveNew',
'title': data_json.get('caption'),
'upload_date': unified_strdate(try_get(data_json, lambda x: x['date']['created'])),