spotify-profile-monitor 2.5__tar.gz → 2.5.2__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.
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/PKG-INFO +1 -1
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/pyproject.toml +1 -1
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/PKG-INFO +1 -1
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.py +18 -18
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/LICENSE +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/README.md +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/setup.cfg +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/SOURCES.txt +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/dependency_links.txt +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/entry_points.txt +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/requires.txt +0 -0
- {spotify_profile_monitor-2.5 → spotify_profile_monitor-2.5.2}/spotify_profile_monitor.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spotify_profile_monitor
|
|
3
|
-
Version: 2.5
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: Tool implementing real-time tracking of Spotify users activities and profile changes including playlists
|
|
5
5
|
Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "spotify_profile_monitor"
|
|
7
|
-
version = "2.5"
|
|
7
|
+
version = "2.5.2"
|
|
8
8
|
description = "Tool implementing real-time tracking of Spotify users activities and profile changes including playlists"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "GPL-3.0-or-later"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spotify_profile_monitor
|
|
3
|
-
Version: 2.5
|
|
3
|
+
Version: 2.5.2
|
|
4
4
|
Summary: Tool implementing real-time tracking of Spotify users activities and profile changes including playlists
|
|
5
5
|
Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
|
|
6
6
|
License-Expression: GPL-3.0-or-later
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
3
|
Author: Michal Szymanski <misiektoja-github@rm-rf.ninja>
|
|
4
|
-
v2.5
|
|
4
|
+
v2.5.2
|
|
5
5
|
|
|
6
6
|
OSINT tool implementing real-time tracking of Spotify users activities and profile changes including playlists:
|
|
7
7
|
https://github.com/misiektoja/spotify_profile_monitor/
|
|
@@ -18,7 +18,7 @@ python-dotenv (optional)
|
|
|
18
18
|
spotipy (optional, needed when the token source is set to oauth_app)
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
VERSION = "2.5"
|
|
21
|
+
VERSION = "2.5.2"
|
|
22
22
|
|
|
23
23
|
# ---------------------------
|
|
24
24
|
# CONFIGURATION SECTION START
|
|
@@ -27,15 +27,16 @@ VERSION = "2.5"
|
|
|
27
27
|
CONFIG_BLOCK = """
|
|
28
28
|
# Select the method used to obtain the Spotify access token
|
|
29
29
|
# Available options:
|
|
30
|
-
# cookie
|
|
31
|
-
# oauth_app
|
|
32
|
-
#
|
|
30
|
+
# cookie - uses the sp_dc cookie to retrieve a token via the Spotify web endpoint (recommended)
|
|
31
|
+
# oauth_app - uses the Client Credentials OAuth flow (app-level token for public data, has some limitations)
|
|
32
|
+
# oauth_user - uses the Authorization Code OAuth flow (user-level token for public and private data, has some limitations)
|
|
33
|
+
# client - uses captured credentials from the Spotify desktop client and a Protobuf-based login flow (for advanced users)
|
|
33
34
|
TOKEN_SOURCE = "cookie"
|
|
34
35
|
|
|
35
36
|
# ---------------------------------------------------------------------
|
|
36
37
|
|
|
37
38
|
# The section below is used when the token source is set to 'cookie'
|
|
38
|
-
# (to configure the alternative 'oauth_app' or 'client' methods, see the section at the end of this config block)
|
|
39
|
+
# (to configure the alternative 'oauth_app', 'oauth_user' or 'client' methods, see the section at the end of this config block)
|
|
39
40
|
#
|
|
40
41
|
# - Log in to Spotify web client (https://open.spotify.com/) and retrieve your sp_dc cookie
|
|
41
42
|
# (use your web browser's dev console or "Cookie-Editor" by cgagnier to extract it easily: https://cookie-editor.com/)
|
|
@@ -106,19 +107,19 @@ IMGCAT_PATH = "imgcat"
|
|
|
106
107
|
|
|
107
108
|
# SHA256 hash needed to search for Spotify users (used with -s)
|
|
108
109
|
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
#
|
|
110
|
+
# - Run an intercepting proxy of your choice (like Proxyman)
|
|
111
|
+
# - Launch the Spotify desktop client and search for some user
|
|
112
|
+
# - Look for requests with the 'searchUsers' or 'searchDesktop' operation name
|
|
113
|
+
# - Display the details of one of these requests and copy the 'sha256Hash' parameter value
|
|
114
|
+
# (string marked as `XXXXXXXXXX` below)
|
|
112
115
|
#
|
|
113
116
|
# Example request:
|
|
114
117
|
# https://api-partner.spotify.com/pathfinder/v1/query?operationName=searchUsers&variables={"searchTerm":"user_uri_id","offset":0,"limit":5,"numberOfTopResults":5,"includeAudiobooks":false}&extensions={"persistedQuery":{"version":1,"sha256Hash":"XXXXXXXXXX"}}
|
|
115
|
-
# You are interested in the string marked as "XXXXXXXXXX" here
|
|
116
118
|
#
|
|
117
119
|
# Provide the SP_SHA256 secret using one of the following methods:
|
|
118
120
|
# - Set it as an environment variable (e.g. export SP_SHA256=...)
|
|
119
121
|
# - Add it to ".env" file (SP_SHA256=...) for persistent use
|
|
120
|
-
# Fallback:
|
|
121
|
-
# - Hard-code it in the code or config file
|
|
122
|
+
# - Fallback: hard-code it in the code or config file
|
|
122
123
|
SP_SHA256 = "your_spotify_client_sha256"
|
|
123
124
|
|
|
124
125
|
# Notify when user's public playlists change? (via console and email if PROFILE_NOTIFICATION / -p is enabled)
|
|
@@ -251,8 +252,7 @@ TOKEN_RETRY_TIMEOUT = 0.5 # 0.5 second
|
|
|
251
252
|
# - Pass it at runtime with -r / --oauth-app-creds (use SP_APP_CLIENT_ID:SP_APP_CLIENT_SECRET format - note the colon separator)
|
|
252
253
|
# - Set it as an environment variable (e.g. export SP_APP_CLIENT_ID=...; export SP_APP_CLIENT_SECRET=...)
|
|
253
254
|
# - Add it to ".env" file (SP_APP_CLIENT_ID=... and SP_APP_CLIENT_SECRET=...) for persistent use
|
|
254
|
-
# Fallback:
|
|
255
|
-
# - Hard-code it in the code or config file
|
|
255
|
+
# - Fallback: hard-code it in the code or config file
|
|
256
256
|
#
|
|
257
257
|
# The tool automatically refreshes the access token, so it remains valid indefinitely
|
|
258
258
|
SP_APP_CLIENT_ID = "your_spotify_app_client_id"
|
|
@@ -278,8 +278,7 @@ SP_APP_TOKENS_FILE = ".spotify-profile-monitor-oauth-app.json"
|
|
|
278
278
|
# - Pass it at runtime with -n / --oauth-user-creds (use SP_USER_CLIENT_ID:SP_USER_CLIENT_SECRET format - note the colon separator)
|
|
279
279
|
# - Set it as an environment variable (e.g. export SP_USER_CLIENT_ID=...; export SP_USER_CLIENT_SECRET=...)
|
|
280
280
|
# - Add it to ".env" file (SP_USER_CLIENT_ID=... and SP_USER_CLIENT_SECRET=...) for persistent use
|
|
281
|
-
# Fallback:
|
|
282
|
-
# - Hard-code it in the code or config file
|
|
281
|
+
# - Fallback: hard-code it in the code or config file
|
|
283
282
|
#
|
|
284
283
|
# To use PKCE mode, set SP_USER_CLIENT_SECRET to an empty string ("")
|
|
285
284
|
#
|
|
@@ -2673,7 +2672,7 @@ def spotify_get_user_followings(access_token, user_uri_id):
|
|
|
2673
2672
|
items = data.get("items", []) or []
|
|
2674
2673
|
for a in items:
|
|
2675
2674
|
if isinstance(a, dict):
|
|
2676
|
-
all_artists.append({"
|
|
2675
|
+
all_artists.append({"name": a.get("name"), "uri": a.get("uri")})
|
|
2677
2676
|
after = data.get("cursors", {}).get("after")
|
|
2678
2677
|
if not after:
|
|
2679
2678
|
break
|
|
@@ -5567,7 +5566,8 @@ def main():
|
|
|
5567
5566
|
print(f"* Ignore listed playlists:\t{bool(PLAYLISTS_TO_SKIP_FILE)}" + (f" ({PLAYLISTS_TO_SKIP_FILE})" if PLAYLISTS_TO_SKIP_FILE else ""))
|
|
5568
5567
|
print(f"* Display profile pics:\t\t{bool(imgcat_exe)}" + (f" (via {imgcat_exe})" if imgcat_exe else ""))
|
|
5569
5568
|
print(f"* Output logging enabled:\t{not DISABLE_LOGGING}" + (f" ({FINAL_LOG_PATH})" if not DISABLE_LOGGING else ""))
|
|
5570
|
-
|
|
5569
|
+
if TOKEN_SOURCE in ('oauth_user', 'oauth_app'):
|
|
5570
|
+
print(f"* Spotify token cache file:\t{({'oauth_app': SP_APP_TOKENS_FILE, 'oauth_user': SP_USER_TOKENS_FILE}.get(TOKEN_SOURCE) or 'None (memory only)')}")
|
|
5571
5571
|
print(f"* Configuration file:\t\t{cfg_path}")
|
|
5572
5572
|
print(f"* Dotenv file:\t\t\t{env_path or 'None'}")
|
|
5573
5573
|
print(f"* Local timezone:\t\t{LOCAL_TIMEZONE}\n")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|