mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 08:35:32 +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:
@ -103,7 +103,7 @@ class WPPilotIE(WPPilotBaseIE):
|
||||
|
||||
is_authorized = next((c for c in self.cookiejar if c.name == 'netviapisessid'), None)
|
||||
# cookies starting with "g:" are assigned to guests
|
||||
is_authorized = True if is_authorized is not None and not is_authorized.value.startswith('g:') else False
|
||||
is_authorized = is_authorized is not None and not is_authorized.value.startswith('g:')
|
||||
|
||||
video = self._download_json(
|
||||
(self._VIDEO_URL if is_authorized else self._VIDEO_GUEST_URL) % video_id,
|
||||
@ -120,7 +120,7 @@ class WPPilotIE(WPPilotBaseIE):
|
||||
data=json.dumps({
|
||||
'channelId': video_id,
|
||||
't': stream_token,
|
||||
}).encode('utf-8'))
|
||||
}).encode())
|
||||
if try_get(close, lambda x: x['data']['status']) == 'ok':
|
||||
return self.url_result(url, ie=WPPilotIE.ie_key())
|
||||
|
||||
|
Reference in New Issue
Block a user