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: