mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-23 09:55:12 +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:
@@ -27,8 +27,8 @@ class CinetecaMilanoIE(InfoExtractor):
|
||||
'modified_date': '20200520',
|
||||
'duration': 3139,
|
||||
'release_timestamp': 1643446208,
|
||||
'modified_timestamp': int
|
||||
}
|
||||
'modified_timestamp': int,
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
@@ -38,7 +38,7 @@ class CinetecaMilanoIE(InfoExtractor):
|
||||
f'https://www.cinetecamilano.it/api/catalogo/{video_id}/?',
|
||||
video_id, headers={
|
||||
'Referer': url,
|
||||
'Authorization': try_get(self._get_cookies('https://www.cinetecamilano.it'), lambda x: f'Bearer {x["cnt-token"].value}') or ''
|
||||
'Authorization': try_get(self._get_cookies('https://www.cinetecamilano.it'), lambda x: f'Bearer {x["cnt-token"].value}') or '',
|
||||
})
|
||||
except ExtractorError as e:
|
||||
if ((isinstance(e.cause, HTTPError) and e.cause.status == 500)
|
||||
@@ -58,5 +58,5 @@ class CinetecaMilanoIE(InfoExtractor):
|
||||
'modified_timestamp': parse_iso8601(archive.get('created_at'), delimiter=' '),
|
||||
'thumbnail': urljoin(url, try_get(archive, lambda x: x['thumb']['src'].replace('/public/', '/storage/'))),
|
||||
'formats': self._extract_m3u8_formats(
|
||||
urljoin(url, traverse_obj(archive, ('drm', 'hls'))), video_id, 'mp4')
|
||||
urljoin(url, traverse_obj(archive, ('drm', 'hls'))), video_id, 'mp4'),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user