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:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:11 +0000
commitfd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch)
treee1c600b8612bc4b301e2f51b875fcd835c5008cc /yt_dlp/extractor/ntvru.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 '')
-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: