From d9f9fcc1477ead219e7c06c593574ba8cc13fe52 Mon Sep 17 00:00:00 2001 From: czifumasa Date: Thu, 18 May 2023 17:29:09 +0200 Subject: [PATCH] Fixed unrecognized case sensitive headers during auth --- ytmusicapi/auth/browser.py | 2 +- ytmusicapi/auth/oauth.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ytmusicapi/auth/browser.py b/ytmusicapi/auth/browser.py index 7462fbc..65c60a0 100644 --- a/ytmusicapi/auth/browser.py +++ b/ytmusicapi/auth/browser.py @@ -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): diff --git a/ytmusicapi/auth/oauth.py b/ytmusicapi/auth/oauth.py index 5f687fa..1845745 100644 --- a/ytmusicapi/auth/oauth.py +++ b/ytmusicapi/auth/oauth.py @@ -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: