mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-31 22:55:18 +00:00
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com> Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user