spotapi 1.2.2__tar.gz → 1.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spotapi-1.2.2/spotapi.egg-info → spotapi-1.2.4}/PKG-INFO +1 -1
- {spotapi-1.2.2 → spotapi-1.2.4}/setup.py +1 -1
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/client.py +7 -9
- {spotapi-1.2.2 → spotapi-1.2.4/spotapi.egg-info}/PKG-INFO +1 -1
- {spotapi-1.2.2 → spotapi-1.2.4}/LICENSE +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/README.md +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/setup.cfg +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/_tests/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/_tests/annotations_test.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/album.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/artist.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/creator.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/exceptions/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/exceptions/errors.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/family.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/http/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/http/data.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/http/request.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/login.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/password.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/player.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/playlist.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/podcast.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/public.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/solvers/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/solvers/capmonster.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/solvers/capsolver.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/song.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/status.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/types/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/types/alias.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/types/annotations.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/types/data.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/types/interfaces.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/user.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/utils/__init__.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/utils/logger.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/utils/saver.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/utils/strings.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi/websocket.py +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi.egg-info/SOURCES.txt +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi.egg-info/dependency_links.txt +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi.egg-info/requires.txt +0 -0
- {spotapi-1.2.2 → spotapi-1.2.4}/spotapi.egg-info/top_level.txt +0 -0
|
@@ -39,7 +39,7 @@ def get_latest_totp_secret() -> Tuple[int, bytearray]:
|
|
|
39
39
|
return _secret_cache
|
|
40
40
|
|
|
41
41
|
try:
|
|
42
|
-
url = "https://
|
|
42
|
+
url = "https://code.thetadev.de/ThetaDev/spotify-secrets/raw/branch/main/secrets/secretDict.json"
|
|
43
43
|
response = requests.get(url, timeout=5)
|
|
44
44
|
if not response.ok:
|
|
45
45
|
raise BaseClientError(f"Failed to fetch secrets: {response.status_code}")
|
|
@@ -119,7 +119,6 @@ class BaseClient:
|
|
|
119
119
|
|
|
120
120
|
def _get_auth_vars(self) -> None:
|
|
121
121
|
if self.access_token is _Undefined or self.client_id is _Undefined:
|
|
122
|
-
totp, version = generate_totp()
|
|
123
122
|
totp, version = generate_totp()
|
|
124
123
|
query = {
|
|
125
124
|
"reason": "init",
|
|
@@ -130,10 +129,11 @@ class BaseClient:
|
|
|
130
129
|
"totpServer": totp,
|
|
131
130
|
}
|
|
132
131
|
resp = self.client.get("https://open.spotify.com/api/token", params=query)
|
|
133
|
-
resp = self.client.get("https://open.spotify.com/api/token", params=query)
|
|
134
132
|
|
|
135
133
|
if resp.fail:
|
|
136
|
-
raise BaseClientError(
|
|
134
|
+
raise BaseClientError(
|
|
135
|
+
"Could not get session auth tokens", error=resp.error.string
|
|
136
|
+
)
|
|
137
137
|
|
|
138
138
|
self.access_token = resp.response["accessToken"]
|
|
139
139
|
self.client_id = resp.response["clientId"]
|
|
@@ -148,10 +148,7 @@ class BaseClient:
|
|
|
148
148
|
(
|
|
149
149
|
link
|
|
150
150
|
for link in _all_js_packs
|
|
151
|
-
if link.
|
|
152
|
-
"https://open.spotifycdn.com/cdn/build/web-player/web-player"
|
|
153
|
-
)
|
|
154
|
-
and link.endswith(".js")
|
|
151
|
+
if "web-player/web-player" in link and link.endswith(".js")
|
|
155
152
|
),
|
|
156
153
|
"",
|
|
157
154
|
)
|
|
@@ -165,7 +162,8 @@ class BaseClient:
|
|
|
165
162
|
|
|
166
163
|
_recaptcha_key = self.server_cfg["recaptchaWebPlayerFraudSiteKey"]
|
|
167
164
|
if _recaptcha_key:
|
|
168
|
-
|
|
165
|
+
global RECAPTCHA_SITE_KEY
|
|
166
|
+
RECAPTCHA_SITE_KEY = _recaptcha_key
|
|
169
167
|
|
|
170
168
|
self.client_version = self.server_cfg["clientVersion"]
|
|
171
169
|
self.device_id = self.client.cookies.get("sp_t") or ""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|