summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/rutv.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit7e21328585afda6d66f98ca476301680eeffac32 (patch)
tree266a4e7b20443f94572748781d71fc0375a15037 /yt_dlp/extractor/rutv.py
parentAdding upstream version 2024.05.27. (diff)
downloadyt-dlp-7e21328585afda6d66f98ca476301680eeffac32.tar.xz
yt-dlp-7e21328585afda6d66f98ca476301680eeffac32.zip
Adding upstream version 2024.07.01.upstream/2024.07.01
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/rutv.py')
-rw-r--r--yt_dlp/extractor/rutv.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/extractor/rutv.py b/yt_dlp/extractor/rutv.py
index 726d491..9bd26ad 100644
--- a/yt_dlp/extractor/rutv.py
+++ b/yt_dlp/extractor/rutv.py
@@ -124,18 +124,18 @@ class RUTVIE(InfoExtractor):
is_live = video_type == 'live'
json_data = self._download_json(
- 'http://player.vgtrk.com/iframe/data%s/id/%s' % ('live' if is_live else 'video', video_id),
+ 'http://player.vgtrk.com/iframe/data{}/id/{}'.format('live' if is_live else 'video', video_id),
video_id, 'Downloading JSON')
if json_data['errors']:
- raise ExtractorError('%s said: %s' % (self.IE_NAME, json_data['errors']), expected=True)
+ raise ExtractorError('{} said: {}'.format(self.IE_NAME, json_data['errors']), expected=True)
playlist = json_data['data']['playlist']
medialist = playlist['medialist']
media = medialist[0]
if media['errors']:
- raise ExtractorError('%s said: %s' % (self.IE_NAME, media['errors']), expected=True)
+ raise ExtractorError('{} said: {}'.format(self.IE_NAME, media['errors']), expected=True)
view_count = int_or_none(playlist.get('count_views'))
priority_transport = playlist['priority_transport']
@@ -175,12 +175,12 @@ class RUTVIE(InfoExtractor):
continue
else:
fmt = {
- 'url': url
+ 'url': url,
}
fmt.update({
'width': int_or_none(quality, default=height, invscale=width, scale=height),
'height': int_or_none(quality, default=height),
- 'format_id': '%s-%s' % (transport, quality),
+ 'format_id': f'{transport}-{quality}',
'source_preference': preference,
})
formats.append(fmt)