Fixed unrecognized case sensitive headers during auth

This commit is contained in:
czifumasa 2023-05-18 17:29:09 +02:00 • committed by sigma67
commit d9f9fcc147
No known key found for this signature in database
GPG key ID: 1C314227DF0103D0
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ path = os.path.dirname(os.path.realpath(__file__)) + os.sep
def is_browser(headers: CaseInsensitiveDict) -> bool:
browser_structure = {"authorization", "cookie"}
return browser_structure.issubset(headers.keys())
return all(key in headers for key in browser_structure)
def setup_browser(filepath=None, headers_raw=None):

View file

@ -19,7 +19,7 @@ def is_oauth(headers: CaseInsensitiveDict) -> bool:
"token_type",
"refresh_token",
}
return oauth_structure.issubset(headers.keys())
return all(key in headers for key in oauth_structure)
class YTMusicOAuth: