mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-12 13:54:28 +00:00
formatting
This commit is contained in:
parent
93f8ffdad0
commit
e25a148568
@ -451,16 +451,10 @@ def validate_response(response: PoTokenResponse | None):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return (
|
if not isinstance(response.expires_at, int):
|
||||||
response.expires_at is None
|
return response.expires_at is None
|
||||||
or (
|
|
||||||
isinstance(response.expires_at, int)
|
return response.expires_at <= 0 or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
|
||||||
and (
|
|
||||||
response.expires_at <= 0
|
|
||||||
or response.expires_at > int(dt.datetime.now(dt.timezone.utc).timestamp())
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def validate_cache_spec(spec: PoTokenCacheSpec):
|
def validate_cache_spec(spec: PoTokenCacheSpec):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user