mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-16 04:58:56 +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:
@@ -65,8 +65,8 @@ class ORFRadioIE(InfoExtractor):
|
||||
'duration': 18000,
|
||||
'timestamp': 1659322789,
|
||||
'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
|
||||
}
|
||||
}]
|
||||
},
|
||||
}],
|
||||
}, {
|
||||
'url': 'https://ooe.orf.at/player/20220801/OGMO',
|
||||
'info_dict': {
|
||||
@@ -84,8 +84,8 @@ class ORFRadioIE(InfoExtractor):
|
||||
'duration': 18000,
|
||||
'timestamp': 1659322789,
|
||||
'description': 'md5:a3f6083399ef92b8cbe2d421b180835a',
|
||||
}
|
||||
}]
|
||||
},
|
||||
}],
|
||||
}, {
|
||||
'url': 'http://fm4.orf.at/player/20170107/4CC',
|
||||
'only_matching': True,
|
||||
@@ -127,7 +127,7 @@ class ORFRadioIE(InfoExtractor):
|
||||
'timestamp': 1483858796,
|
||||
'upload_date': '20170108',
|
||||
},
|
||||
'skip': 'Shows from ORF radios are only available for 7 days.'
|
||||
'skip': 'Shows from ORF radios are only available for 7 days.',
|
||||
}]
|
||||
|
||||
def _entries(self, data, station):
|
||||
@@ -175,7 +175,7 @@ class ORFPodcastIE(InfoExtractor):
|
||||
'duration': 3396.0,
|
||||
'series': 'Frühstück bei mir',
|
||||
},
|
||||
'skip': 'ORF podcasts are only available for a limited time'
|
||||
'skip': 'ORF podcasts are only available for a limited time',
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
@@ -221,13 +221,13 @@ class ORFIPTVIE(InfoExtractor):
|
||||
story_id = self._match_id(url)
|
||||
|
||||
webpage = self._download_webpage(
|
||||
'http://iptv.orf.at/stories/%s' % story_id, story_id)
|
||||
f'http://iptv.orf.at/stories/{story_id}', story_id)
|
||||
|
||||
video_id = self._search_regex(
|
||||
r'data-video(?:id)?="(\d+)"', webpage, 'video id')
|
||||
|
||||
data = self._download_json(
|
||||
'http://bits.orf.at/filehandler/static-api/json/current/data.json?file=%s' % video_id,
|
||||
f'http://bits.orf.at/filehandler/static-api/json/current/data.json?file={video_id}',
|
||||
video_id)[0]
|
||||
|
||||
duration = float_or_none(data['duration'], 1000)
|
||||
@@ -326,7 +326,7 @@ class ORFFM4StoryIE(InfoExtractor):
|
||||
all_ids = orderedSet(re.findall(r'data-video(?:id)?="(\d+)"', webpage))
|
||||
for idx, video_id in enumerate(all_ids):
|
||||
data = self._download_json(
|
||||
'http://bits.orf.at/filehandler/static-api/json/current/data.json?file=%s' % video_id,
|
||||
f'http://bits.orf.at/filehandler/static-api/json/current/data.json?file={video_id}',
|
||||
video_id)[0]
|
||||
|
||||
duration = float_or_none(data['duration'], 1000)
|
||||
|
||||
Reference in New Issue
Block a user