mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-15 20:48:58 +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:
@@ -23,22 +23,22 @@ class UrortIE(InfoExtractor):
|
||||
},
|
||||
'params': {
|
||||
'matchtitle': '^The Bomb$', # To test, we want just one video
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
def _real_extract(self, url):
|
||||
playlist_id = self._match_id(url)
|
||||
|
||||
fstr = urllib.parse.quote("InternalBandUrl eq '%s'" % playlist_id)
|
||||
json_url = 'http://urort.p3.no/breeze/urort/TrackDTOViews?$filter=%s&$orderby=Released%%20desc&$expand=Tags%%2CFiles' % fstr
|
||||
fstr = urllib.parse.quote(f"InternalBandUrl eq '{playlist_id}'")
|
||||
json_url = f'http://urort.p3.no/breeze/urort/TrackDTOViews?$filter={fstr}&$orderby=Released%20desc&$expand=Tags%2CFiles'
|
||||
songs = self._download_json(json_url, playlist_id)
|
||||
entries = []
|
||||
for s in songs:
|
||||
formats = [{
|
||||
'tbr': f.get('Quality'),
|
||||
'ext': f['FileType'],
|
||||
'format_id': '%s-%s' % (f['FileType'], f.get('Quality', '')),
|
||||
'url': 'http://p3urort.blob.core.windows.net/tracks/%s' % f['FileRef'],
|
||||
'format_id': '{}-{}'.format(f['FileType'], f.get('Quality', '')),
|
||||
'url': 'http://p3urort.blob.core.windows.net/tracks/{}'.format(f['FileRef']),
|
||||
'quality': 3 if f['FileType'] == 'mp3' else 2,
|
||||
} for f in s['Files']]
|
||||
e = {
|
||||
@@ -46,7 +46,7 @@ class UrortIE(InfoExtractor):
|
||||
'title': s['Title'],
|
||||
'uploader_id': playlist_id,
|
||||
'uploader': s.get('BandName', playlist_id),
|
||||
'thumbnail': 'http://urort.p3.no/cloud/images/%s' % s['Image'],
|
||||
'thumbnail': 'http://urort.p3.no/cloud/images/{}'.format(s['Image']),
|
||||
'upload_date': unified_strdate(s.get('Released')),
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user