summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/ntvru.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/ntvru.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 '')
-rw-r--r--yt_dlp/extractor/ntvru.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/yt_dlp/extractor/ntvru.py b/yt_dlp/extractor/ntvru.py
index fe39657..1ab1be0 100644
--- a/yt_dlp/extractor/ntvru.py
+++ b/yt_dlp/extractor/ntvru.py
@@ -102,7 +102,7 @@ class NTVRuIE(InfoExtractor):
self._VIDEO_ID_REGEXES, webpage, 'video id')
player = self._download_xml(
- 'http://www.ntv.ru/vi%s/' % video_id,
+ f'http://www.ntv.ru/vi{video_id}/',
video_id, 'Downloading video XML')
title = strip_or_none(unescapeHTML(xpath_text(player, './data/title', 'title', fatal=True)))
@@ -111,7 +111,7 @@ class NTVRuIE(InfoExtractor):
formats = []
for format_id in ['', 'hi', 'webm']:
- file_ = xpath_text(video, './%sfile' % format_id)
+ file_ = xpath_text(video, f'./{format_id}file')
if not file_:
continue
if file_.startswith('//'):
@@ -120,7 +120,7 @@ class NTVRuIE(InfoExtractor):
file_ = 'http://media.ntv.ru/vod/' + file_
formats.append({
'url': file_,
- 'filesize': int_or_none(xpath_text(video, './%ssize' % format_id)),
+ 'filesize': int_or_none(xpath_text(video, f'./{format_id}size')),
})
hls_manifest = xpath_text(video, './playback/hls')
if hls_manifest: