summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/skynewsau.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/skynewsau.py
parentReleasing progress-linux version 2024.05.27-1~progress7.99u1. (diff)
downloadyt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz
yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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'])),