spotify-profile-monitor 3.0__tar.gz → 3.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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spotify_profile_monitor
3
- Version: 3.0
4
- Summary: Tool implementing real-time tracking of Spotify users activities and profile changes including playlists
3
+ Version: 3.2
4
+ Summary: Track Spotify profile, follower and playlist changes in real time
5
5
  Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
6
6
  License-Expression: GPL-3.0-or-later
7
7
  Project-URL: Homepage, https://github.com/misiektoja/spotify_profile_monitor
@@ -9,6 +9,15 @@ Project-URL: Source, https://github.com/misiektoja/spotify_profile_monitor
9
9
  Project-URL: Changelog, https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md
10
10
  Keywords: spotify,monitoring,tracking,real-time,playlists,osint
11
11
  Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.6
13
+ Classifier: Programming Language :: Python :: 3.7
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
12
21
  Classifier: Operating System :: OS Independent
13
22
  Classifier: Operating System :: Microsoft :: Windows
14
23
  Classifier: Operating System :: POSIX :: Linux
@@ -29,38 +38,61 @@ Dynamic: license-file
29
38
 
30
39
  # spotify_profile_monitor
31
40
 
32
- OSINT tool for real-time monitoring of **Spotify users' activities and profile changes including playlists**.
41
+ <p align="left">
42
+ <img src="https://img.shields.io/github/v/release/misiektoja/spotify_profile_monitor?style=flat-square&color=blue" alt="GitHub Release" />
43
+ <img src="https://img.shields.io/pypi/v/spotify_profile_monitor?style=flat-square&color=teal" alt="PyPI Version" />
44
+ <img src="https://img.shields.io/github/stars/misiektoja/spotify_profile_monitor?style=flat-square&color=magenta" alt="GitHub Stars" />
45
+ <img src="https://img.shields.io/badge/python-3.6+-blueviolet?style=flat-square" alt="Python Versions" />
46
+ <img src="https://img.shields.io/github/license/misiektoja/spotify_profile_monitor?style=flat-square&color=blue" alt="License" />
47
+ <img src="https://img.shields.io/github/last-commit/misiektoja/spotify_profile_monitor?style=flat-square&color=green" alt="Last Commit" />
48
+ <img src="https://img.shields.io/badge/maintenance-active-brightgreen?style=flat-square" alt="Maintenance" />
49
+ </p>
33
50
 
34
- If you want to track Spotify friends' music activity, check out another tool I developed: [spotify_monitor](https://github.com/misiektoja/spotify_monitor).
51
+ Powerful Spotify tool for real-time tracking of profile changes, playlist updates, follower growth, collaborators and more - delivered straight to your terminal or inbox.
35
52
 
36
- 🛠️ If you're looking for debug tools to get Spotify Web Player access tokens and extract secret keys: [click here](#debugging-tools)
53
+ ### 🚀 Quick Install
54
+ ```sh
55
+ pip install spotify_profile_monitor
56
+ ```
57
+
58
+ <p align="center">
59
+ <img src="https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor.png" alt="spotify_profile_monitor_screenshot" width="90%"/>
60
+ </p>
37
61
 
38
62
  <a id="features"></a>
39
63
  ## Features
40
64
 
41
- - **Real-time tracking** of Spotify user activities and profile changes:
42
- - addition/removal of **followings and followers**
43
- - addition/removal of **playlists**
44
- - addition/removal of **tracks in playlists** (including collaborator info for newly added tracks)
45
- - **playlists name and description** changes
46
- - **number of likes** for playlists
47
- - **number of collaborators** for playlists
48
- - **profile picture** changes
49
- - **username** changes
50
- - **Email notifications** for various events (as listed above)
51
- - **Attaching changed profile pictures** directly to email notifications
52
- - **Displaying the profile picture** right in your terminal (if you have `imgcat` installed)
53
- - Additional functionalities on top of the monitoring mode allowing to display **detailed info about the user**, **list of followers & followings**, **recently played artists** and possibility to **search for users** in Spotify catalog with specific names
54
- - Ability to **display and export** the list of tracks for a specific playlist (including **Liked Songs** for the user who owns the Spotify access token)
55
- - **Saving all profile changes** (including playlists) with timestamps to the **CSV file**
56
- - **Clickable** **Spotify**, **Apple Music**, **YouTube Music**, **Amazon Music**, **Deezer**, **Tidal**, **Genius Lyrics**, **AZLyrics**, **Tekstowo.pl**, **Musixmatch** and **Lyrics.com** search URLs printed in the console and included in email notifications (configurable per service)
57
- - Support for **four different methods to get a Spotify access token** (`sp_dc cookie`, `desktop client`, `OAuth app`, `OAuth user`)
58
- - Possibility to **control the running copy** of the script via signals
59
- - **Functional, procedural Python** (minimal OOP)
65
+ ### 👤 Profile Monitoring
66
+ - **Real-time tracking**: Monitor Spotify user activities and profile changes.
67
+ - **Social Network**: Detect addition/removal of **followings** and **followers**.
68
+ - **Identity Changes**: Track **profile picture** and **username** changes.
69
+
70
+ ### 📜 Playlist Tracking
71
+ - **Content Updates**: Monitor addition/removal of **tracks in playlists**.
72
+ - **Collaborator Info**: Identify who added which track in **collaborative playlists**.
73
+ - **Social Proof**: Monitor **likes** and **collaborators** count for playlists.
74
+ - **Metadata**: Track **name** and **description** changes.
75
+
76
+ ### 📊 Advanced Tools
77
+ - **Deep Insights**: Display detailed info about users, followers and followings.
78
+ - **Historical Data**: View **recently played artists** and **search for users** by name.
79
+ - **Export Power**: Display and export tracks from any playlist (including **Liked Songs**).
80
+ - **Global Search**: Instant links to **Spotify, YouTube Music, Apple Music, Tidal, lyrics** and more.
81
+
82
+ ### 🔔 Smart Interactions
83
+ - **Instant Alerts**: Detailed **Email notifications** for all profile and playlist changes.
84
+ - **Visual Reports**: Attach changed profile pictures directly to emails.
85
+ - **Terminal Graphics**: Display profile pictures right in your terminal (via `imgcat`).
86
+
87
+ ### ⚙️ Power Features
88
+ - **Auth Flexibility**: Hybrid support for `sp_dc` cookie, Desktop Client and OAuth.
89
+ - **CSV Logging**: Save all changes with full timestamps to a CSV file.
90
+ - **Flexible Config**: Support for files, dotenv and environment variables.
91
+ - **Signal Control**: Manage the running script via system signals (`SIGHUP`, `USR1`, etc.).
60
92
 
61
- <p align="center">
62
- <img src="https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor.png" alt="spotify_profile_monitor_screenshot" width="100%"/>
63
- </p>
93
+ If you want to track Spotify friends' music activity, check out another tool I developed: [spotify_monitor](https://github.com/misiektoja/spotify_monitor).
94
+
95
+ 🛠️ If you're looking for debug tools to get Spotify Web Player access tokens and extract secret keys: [click here](#debugging-tools)
64
96
 
65
97
  <a id="table-of-contents"></a>
66
98
  ## Table of Contents
@@ -156,17 +188,16 @@ If you installed manually, download the newest *[spotify_profile_monitor.py](htt
156
188
  <a id="quick-start"></a>
157
189
  ## Quick Start
158
190
 
159
- - Grab your [Spotify sp_dc cookie](#spotify-sp_dc-cookie) and track the `spotify_user_uri_id` profile changes (including playlists):
160
-
191
+ - Grab your [Spotify sp_dc cookie](#spotify-sp_dc-cookie), set up [OAuth app credentials](#spotify-oauth-app) and track the `spotify_user_uri_id` profile changes (including playlists):
161
192
 
162
193
  ```sh
163
- spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
194
+ spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
164
195
  ```
165
196
 
166
197
  Or if you installed [manually](#manual-installation):
167
198
 
168
199
  ```sh
169
- python3 spotify_profile_monitor.py <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
200
+ python3 spotify_profile_monitor.py <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
170
201
  ```
171
202
 
172
203
  To get the list of all supported command-line arguments / flags:
@@ -186,12 +217,19 @@ Most settings can be configured via command-line arguments.
186
217
  If you want to have it stored persistently, generate a default config template and save it to a file named `spotify_profile_monitor.conf`:
187
218
 
188
219
  ```sh
220
+ # On macOS, Linux or Windows Command Prompt (cmd.exe)
189
221
  spotify_profile_monitor --generate-config > spotify_profile_monitor.conf
190
222
 
223
+ # On Windows PowerShell (recommended to avoid encoding issues)
224
+ spotify_profile_monitor --generate-config spotify_profile_monitor.conf
191
225
  ```
192
226
 
227
+ > **IMPORTANT**: On **Windows PowerShell**, using redirection (`>`) can cause the file to be encoded in UTF-16, which will lead to "null bytes" errors when running the tool. It is highly recommended to provide the filename directly as an argument to `--generate-config` to ensure UTF-8 encoding.
228
+
193
229
  Edit the `spotify_profile_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).
194
230
 
231
+ **New in v3.1:** The tool now uses a hybrid authentication approach. OAuth app credentials (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) are required for playlist and user information retrieval when using either `cookie` or `client` token source methods. See [Spotify OAuth App](#spotify-oauth-app) section for setup instructions.
232
+
195
233
  **New in v2.9:** The configuration file includes options to enable/disable music service URLs (Apple Music, YouTube Music, Amazon Music, Deezer, Tidal) and lyrics service URLs (Genius, AZLyrics, Tekstowo.pl, Musixmatch, Lyrics.com) in console and email outputs.
196
234
 
197
235
  <a id="spotify-access-token-source"></a>
@@ -199,16 +237,23 @@ Edit the `spotify_profile_monitor.conf` file and change any desired configuratio
199
237
 
200
238
  The tool supports four methods for obtaining a Spotify access token.
201
239
 
202
- It can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
240
+ When you decide to use the `cookie` or `client` token source method, the tool uses a **hybrid authentication approach** and you also need to configure **OAuth app credentials** (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) for playlist and user information retrieval as described in [Spotify OAuth App](#spotify-oauth-app).
241
+
242
+ The token source method can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
203
243
 
204
244
  **Recommended: `cookie`**
205
245
 
206
246
  Uses the `sp_dc` cookie to retrieve a token from the Spotify web endpoint. This method is easy to set up and supports all features except fetching the list of liked tracks for the account that owns the access token (due to recent Spotify token's scope restrictions).
207
247
 
248
+ Since version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.
249
+
250
+
208
251
  **Alternative: `client`**
209
252
 
210
253
  Uses captured credentials from the Spotify desktop client and a Protobuf-based login flow. It's more complex to set up, but supports all features. This method is intended for advanced users who want a long-lasting token with the broadest possible access.
211
254
 
255
+ Since version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.
256
+
212
257
  **Safe fallback: `oauth_app`**
213
258
 
214
259
  Relies on the official Spotify Web API (Client Credentials OAuth flow). This method is easy to set up and safe to use, but has several limitations. The following features are **not** supported:
@@ -263,7 +308,7 @@ If your `sp_dc` cookie expires, the tool will notify you via the console and ema
263
308
 
264
309
  If you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to reload the file with the new `sp_dc` cookie without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).
265
310
 
266
- > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every two days, that's why since v2.7 the tool fetches it from remote URL (see `SECRET_CIPHER_DICT_URL`); you can also run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles) for more info).
311
+ > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days, that's why since v2.7 the tool fetches it from remote URL (see `SECRET_CIPHER_DICT_URL`); you can also run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles) for more info).
267
312
 
268
313
  <a id="spotify-desktop-client"></a>
269
314
  #### Spotify Desktop Client
@@ -318,39 +363,42 @@ Advanced options are available for further customization - refer to the configur
318
363
  <a id="spotify-oauth-app"></a>
319
364
  #### Spotify OAuth App
320
365
 
366
+ Can be used as a standalone mode, but also as a secondary mode to either a `cookie` or `client` token source method to retrieve playlist and user information (required due to restrictions introduced by Spotify on December 22, 2025).
367
+
321
368
  This method uses an official Spotify Web API (Client Credentials OAuth flow).
322
369
 
323
- - Log in to Spotify Developer dashboard: https://developer.spotify.com/dashboard
370
+ To obtain the credentials:
371
+
372
+ - Log in to [Spotify Developer dashboard](https://developer.spotify.com/dashboard)
324
373
 
325
374
  - Create a new app
326
375
 
327
- - For **Redirect URL**, use: http://127.0.0.1:1234
328
- - The URL must match exactly as shown, including not having a / at the end
329
- - When copying the link via right-click, some browsers may add an extra / to the URL
376
+ - For **Redirect URL**, use: `http://127.0.0.1:1234`
377
+ - The URL must match exactly as shown, including not having a `/` at the end
378
+ - When copying the link via right-click, some browsers may add an extra `/` to the URL
330
379
 
331
380
  - Select **Web API** as the intended API
332
381
 
333
382
  - Copy the **Client ID** and **Client Secret**
334
383
 
335
384
  - Provide the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` secrets using one of the following methods:
336
- - Pass it at runtime with `-r` / `--oauth-app-creds`
337
- - Use `SP_APP_CLIENT_ID`:`SP_APP_CLIENT_SECRET` format - note the colon separator
385
+ - Pass it at runtime with `-r` / `--oauth-app-creds` (use `SP_APP_CLIENT_ID:SP_APP_CLIENT_SECRET` format - note the colon separator)
338
386
  - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_APP_CLIENT_ID=...; export SP_APP_CLIENT_SECRET=...`)
339
387
  - Add it to [.env file](#storing-secrets) (`SP_APP_CLIENT_ID=...` and `SP_APP_CLIENT_SECRET=...`) for persistent use
340
388
  - Fallback: hard-code it in the code or config file
341
389
 
342
- You can use the same client ID and secret values as those used for the [Spotify OAuth User](#spotify-oauth-user).
343
-
344
390
  Example:
345
391
 
346
392
  ```sh
347
393
  spotify_profile_monitor --token-source oauth_app -r "your_spotify_app_client_id:your_spotify_app_client_secret" <spotify_user_uri_id>
348
394
  ```
349
395
 
350
- The tool takes care of refreshing the access token so it should remain valid indefinitely.
396
+ The tool automatically refreshes the OAuth app access token, so it remains valid indefinitely. Tokens are cached in the file specified by `SP_APP_TOKENS_FILE` configuration option (default: `.spotify-profile-monitor-oauth-app.json`).
351
397
 
352
398
  If you store the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` in a dotenv file you can update their values and send a `SIGHUP` signal to reload the file with the new secret values without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).
353
399
 
400
+ You can also use this method as a standalone token source (without `cookie` or `client`) by setting `TOKEN_SOURCE` to `oauth_app`, but this has several limitations as described in the [Spotify access token source](#spotify-access-token-source) section.
401
+
354
402
  <a id="spotify-oauth-user"></a>
355
403
  #### Spotify OAuth User
356
404
 
@@ -529,6 +577,14 @@ If you use the default method to obtain a Spotify access token (`cookie`) and ha
529
577
  spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
530
578
  ```
531
579
 
580
+ **Note:** OAuth app credentials are now required for playlist and user information retrieval. If you haven't set `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` via environment variables or `.env` file, you can use the `-r` flag:
581
+
582
+ ```sh
583
+ spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
584
+ ```
585
+
586
+ See [Spotify OAuth App](#spotify-oauth-app) for detailed setup instructions.
587
+
532
588
  By default, the tool looks for a configuration file named `spotify_profile_monitor.conf` in:
533
589
  - current directory
534
590
  - home directory (`~`)
@@ -661,12 +717,6 @@ If you want to display a list of recently played artists (this feature only work
661
717
  spotify_profile_monitor <spotify_user_uri_id> -a
662
718
  ```
663
719
 
664
- To get basic information about the Spotify access token owner (`-v` flag):
665
-
666
- ```sh
667
- spotify_profile_monitor -v
668
- ```
669
-
670
720
  If you want to search the Spotify catalog for users with a specific name to obtain their Spotify user URI ID (`-s` flag):
671
721
 
672
722
  ```sh
@@ -873,7 +923,7 @@ You should get a valid Spotify access token, example output:
873
923
  <img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_totp_test.png" alt="spotify_monitor_totp_test" width="100%"/>
874
924
  </p>
875
925
 
876
- > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every two days; you can either run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [here](#secret-key-extraction-from-spotify-web-player-bundles) for more info) or you can pass `--fetch-secrets` flag in `spotify_monitor_totp_test` (available since v1.6). There is also a [xyloflake/spot-secrets-go/](https://github.com/xyloflake/spot-secrets-go/) repo which offers JSON files that are automatically updated with current secrets (you can pass `--download-secrets` flag in `spotify_monitor_totp_test` to get it automatically from remote URL, available since v1.8).
926
+ > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days; you can either run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [here](#secret-key-extraction-from-spotify-web-player-bundles) for more info) or you can pass `--fetch-secrets` flag in `spotify_monitor_totp_test` (available since v1.6). There is also a [xyloflake/spot-secrets-go/](https://github.com/xyloflake/spot-secrets-go/) repo which offers JSON files that are automatically updated with current secrets (you can pass `--download-secrets` flag in `spotify_monitor_totp_test` to get it automatically from remote URL, available since v1.8).
877
927
 
878
928
  <a id="secret-key-extraction-from-spotify-web-player-bundles"></a>
879
929
  ### Secret Key Extraction from Spotify Web Player Bundles
@@ -1,66 +1,60 @@
1
- Metadata-Version: 2.4
2
- Name: spotify_profile_monitor
3
- Version: 3.0
4
- Summary: Tool implementing real-time tracking of Spotify users activities and profile changes including playlists
5
- Author-email: Michal Szymanski <misiektoja-pypi@rm-rf.ninja>
6
- License-Expression: GPL-3.0-or-later
7
- Project-URL: Homepage, https://github.com/misiektoja/spotify_profile_monitor
8
- Project-URL: Source, https://github.com/misiektoja/spotify_profile_monitor
9
- Project-URL: Changelog, https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md
10
- Keywords: spotify,monitoring,tracking,real-time,playlists,osint
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Operating System :: Microsoft :: Windows
14
- Classifier: Operating System :: POSIX :: Linux
15
- Classifier: Operating System :: MacOS :: MacOS X
16
- Requires-Python: >=3.6
17
- Description-Content-Type: text/markdown
18
- License-File: LICENSE
19
- Requires-Dist: requests>=2.0
20
- Requires-Dist: python-dateutil>=2.8
21
- Requires-Dist: urllib3>=2.0.7
22
- Requires-Dist: pyotp>=2.9.0
23
- Requires-Dist: pytz>=2020.1
24
- Requires-Dist: tzlocal>=4.0
25
- Requires-Dist: python-dotenv>=0.19
26
- Requires-Dist: spotipy>=2.24.0
27
- Requires-Dist: wcwidth>=0.2.7
28
- Dynamic: license-file
29
-
30
1
  # spotify_profile_monitor
31
2
 
32
- OSINT tool for real-time monitoring of **Spotify users' activities and profile changes including playlists**.
3
+ <p align="left">
4
+ <img src="https://img.shields.io/github/v/release/misiektoja/spotify_profile_monitor?style=flat-square&color=blue" alt="GitHub Release" />
5
+ <img src="https://img.shields.io/pypi/v/spotify_profile_monitor?style=flat-square&color=teal" alt="PyPI Version" />
6
+ <img src="https://img.shields.io/github/stars/misiektoja/spotify_profile_monitor?style=flat-square&color=magenta" alt="GitHub Stars" />
7
+ <img src="https://img.shields.io/badge/python-3.6+-blueviolet?style=flat-square" alt="Python Versions" />
8
+ <img src="https://img.shields.io/github/license/misiektoja/spotify_profile_monitor?style=flat-square&color=blue" alt="License" />
9
+ <img src="https://img.shields.io/github/last-commit/misiektoja/spotify_profile_monitor?style=flat-square&color=green" alt="Last Commit" />
10
+ <img src="https://img.shields.io/badge/maintenance-active-brightgreen?style=flat-square" alt="Maintenance" />
11
+ </p>
33
12
 
34
- If you want to track Spotify friends' music activity, check out another tool I developed: [spotify_monitor](https://github.com/misiektoja/spotify_monitor).
13
+ Powerful Spotify tool for real-time tracking of profile changes, playlist updates, follower growth, collaborators and more - delivered straight to your terminal or inbox.
35
14
 
36
- 🛠️ If you're looking for debug tools to get Spotify Web Player access tokens and extract secret keys: [click here](#debugging-tools)
15
+ ### 🚀 Quick Install
16
+ ```sh
17
+ pip install spotify_profile_monitor
18
+ ```
19
+
20
+ <p align="center">
21
+ <img src="https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor.png" alt="spotify_profile_monitor_screenshot" width="90%"/>
22
+ </p>
37
23
 
38
24
  <a id="features"></a>
39
25
  ## Features
40
26
 
41
- - **Real-time tracking** of Spotify user activities and profile changes:
42
- - addition/removal of **followings and followers**
43
- - addition/removal of **playlists**
44
- - addition/removal of **tracks in playlists** (including collaborator info for newly added tracks)
45
- - **playlists name and description** changes
46
- - **number of likes** for playlists
47
- - **number of collaborators** for playlists
48
- - **profile picture** changes
49
- - **username** changes
50
- - **Email notifications** for various events (as listed above)
51
- - **Attaching changed profile pictures** directly to email notifications
52
- - **Displaying the profile picture** right in your terminal (if you have `imgcat` installed)
53
- - Additional functionalities on top of the monitoring mode allowing to display **detailed info about the user**, **list of followers & followings**, **recently played artists** and possibility to **search for users** in Spotify catalog with specific names
54
- - Ability to **display and export** the list of tracks for a specific playlist (including **Liked Songs** for the user who owns the Spotify access token)
55
- - **Saving all profile changes** (including playlists) with timestamps to the **CSV file**
56
- - **Clickable** **Spotify**, **Apple Music**, **YouTube Music**, **Amazon Music**, **Deezer**, **Tidal**, **Genius Lyrics**, **AZLyrics**, **Tekstowo.pl**, **Musixmatch** and **Lyrics.com** search URLs printed in the console and included in email notifications (configurable per service)
57
- - Support for **four different methods to get a Spotify access token** (`sp_dc cookie`, `desktop client`, `OAuth app`, `OAuth user`)
58
- - Possibility to **control the running copy** of the script via signals
59
- - **Functional, procedural Python** (minimal OOP)
27
+ ### 👤 Profile Monitoring
28
+ - **Real-time tracking**: Monitor Spotify user activities and profile changes.
29
+ - **Social Network**: Detect addition/removal of **followings** and **followers**.
30
+ - **Identity Changes**: Track **profile picture** and **username** changes.
31
+
32
+ ### 📜 Playlist Tracking
33
+ - **Content Updates**: Monitor addition/removal of **tracks in playlists**.
34
+ - **Collaborator Info**: Identify who added which track in **collaborative playlists**.
35
+ - **Social Proof**: Monitor **likes** and **collaborators** count for playlists.
36
+ - **Metadata**: Track **name** and **description** changes.
37
+
38
+ ### 📊 Advanced Tools
39
+ - **Deep Insights**: Display detailed info about users, followers and followings.
40
+ - **Historical Data**: View **recently played artists** and **search for users** by name.
41
+ - **Export Power**: Display and export tracks from any playlist (including **Liked Songs**).
42
+ - **Global Search**: Instant links to **Spotify, YouTube Music, Apple Music, Tidal, lyrics** and more.
43
+
44
+ ### 🔔 Smart Interactions
45
+ - **Instant Alerts**: Detailed **Email notifications** for all profile and playlist changes.
46
+ - **Visual Reports**: Attach changed profile pictures directly to emails.
47
+ - **Terminal Graphics**: Display profile pictures right in your terminal (via `imgcat`).
48
+
49
+ ### ⚙️ Power Features
50
+ - **Auth Flexibility**: Hybrid support for `sp_dc` cookie, Desktop Client and OAuth.
51
+ - **CSV Logging**: Save all changes with full timestamps to a CSV file.
52
+ - **Flexible Config**: Support for files, dotenv and environment variables.
53
+ - **Signal Control**: Manage the running script via system signals (`SIGHUP`, `USR1`, etc.).
60
54
 
61
- <p align="center">
62
- <img src="https://raw.githubusercontent.com/misiektoja/spotify_profile_monitor/refs/heads/main/assets/spotify_profile_monitor.png" alt="spotify_profile_monitor_screenshot" width="100%"/>
63
- </p>
55
+ If you want to track Spotify friends' music activity, check out another tool I developed: [spotify_monitor](https://github.com/misiektoja/spotify_monitor).
56
+
57
+ 🛠️ If you're looking for debug tools to get Spotify Web Player access tokens and extract secret keys: [click here](#debugging-tools)
64
58
 
65
59
  <a id="table-of-contents"></a>
66
60
  ## Table of Contents
@@ -156,17 +150,16 @@ If you installed manually, download the newest *[spotify_profile_monitor.py](htt
156
150
  <a id="quick-start"></a>
157
151
  ## Quick Start
158
152
 
159
- - Grab your [Spotify sp_dc cookie](#spotify-sp_dc-cookie) and track the `spotify_user_uri_id` profile changes (including playlists):
160
-
153
+ - Grab your [Spotify sp_dc cookie](#spotify-sp_dc-cookie), set up [OAuth app credentials](#spotify-oauth-app) and track the `spotify_user_uri_id` profile changes (including playlists):
161
154
 
162
155
  ```sh
163
- spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
156
+ spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
164
157
  ```
165
158
 
166
159
  Or if you installed [manually](#manual-installation):
167
160
 
168
161
  ```sh
169
- python3 spotify_profile_monitor.py <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
162
+ python3 spotify_profile_monitor.py <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
170
163
  ```
171
164
 
172
165
  To get the list of all supported command-line arguments / flags:
@@ -186,12 +179,19 @@ Most settings can be configured via command-line arguments.
186
179
  If you want to have it stored persistently, generate a default config template and save it to a file named `spotify_profile_monitor.conf`:
187
180
 
188
181
  ```sh
182
+ # On macOS, Linux or Windows Command Prompt (cmd.exe)
189
183
  spotify_profile_monitor --generate-config > spotify_profile_monitor.conf
190
184
 
185
+ # On Windows PowerShell (recommended to avoid encoding issues)
186
+ spotify_profile_monitor --generate-config spotify_profile_monitor.conf
191
187
  ```
192
188
 
189
+ > **IMPORTANT**: On **Windows PowerShell**, using redirection (`>`) can cause the file to be encoded in UTF-16, which will lead to "null bytes" errors when running the tool. It is highly recommended to provide the filename directly as an argument to `--generate-config` to ensure UTF-8 encoding.
190
+
193
191
  Edit the `spotify_profile_monitor.conf` file and change any desired configuration options (detailed comments are provided for each).
194
192
 
193
+ **New in v3.1:** The tool now uses a hybrid authentication approach. OAuth app credentials (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) are required for playlist and user information retrieval when using either `cookie` or `client` token source methods. See [Spotify OAuth App](#spotify-oauth-app) section for setup instructions.
194
+
195
195
  **New in v2.9:** The configuration file includes options to enable/disable music service URLs (Apple Music, YouTube Music, Amazon Music, Deezer, Tidal) and lyrics service URLs (Genius, AZLyrics, Tekstowo.pl, Musixmatch, Lyrics.com) in console and email outputs.
196
196
 
197
197
  <a id="spotify-access-token-source"></a>
@@ -199,16 +199,23 @@ Edit the `spotify_profile_monitor.conf` file and change any desired configuratio
199
199
 
200
200
  The tool supports four methods for obtaining a Spotify access token.
201
201
 
202
- It can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
202
+ When you decide to use the `cookie` or `client` token source method, the tool uses a **hybrid authentication approach** and you also need to configure **OAuth app credentials** (`SP_APP_CLIENT_ID`, `SP_APP_CLIENT_SECRET`) for playlist and user information retrieval as described in [Spotify OAuth App](#spotify-oauth-app).
203
+
204
+ The token source method can be configured via the `TOKEN_SOURCE` configuration option or the `--token-source` flag.
203
205
 
204
206
  **Recommended: `cookie`**
205
207
 
206
208
  Uses the `sp_dc` cookie to retrieve a token from the Spotify web endpoint. This method is easy to set up and supports all features except fetching the list of liked tracks for the account that owns the access token (due to recent Spotify token's scope restrictions).
207
209
 
210
+ Since version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.
211
+
212
+
208
213
  **Alternative: `client`**
209
214
 
210
215
  Uses captured credentials from the Spotify desktop client and a Protobuf-based login flow. It's more complex to set up, but supports all features. This method is intended for advanced users who want a long-lasting token with the broadest possible access.
211
216
 
217
+ Since version 3.1, due to Spotify restrictions introduced on December 22, 2025, it no longer shows other users' playlists added to a user's profile unless the user is a collaborator on a playlist owned by another user.
218
+
212
219
  **Safe fallback: `oauth_app`**
213
220
 
214
221
  Relies on the official Spotify Web API (Client Credentials OAuth flow). This method is easy to set up and safe to use, but has several limitations. The following features are **not** supported:
@@ -263,7 +270,7 @@ If your `sp_dc` cookie expires, the tool will notify you via the console and ema
263
270
 
264
271
  If you store the `SP_DC_COOKIE` in a dotenv file you can update its value and send a `SIGHUP` signal to reload the file with the new `sp_dc` cookie without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).
265
272
 
266
- > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every two days, that's why since v2.7 the tool fetches it from remote URL (see `SECRET_CIPHER_DICT_URL`); you can also run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles) for more info).
273
+ > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days, that's why since v2.7 the tool fetches it from remote URL (see `SECRET_CIPHER_DICT_URL`); you can also run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles) for more info).
267
274
 
268
275
  <a id="spotify-desktop-client"></a>
269
276
  #### Spotify Desktop Client
@@ -318,39 +325,42 @@ Advanced options are available for further customization - refer to the configur
318
325
  <a id="spotify-oauth-app"></a>
319
326
  #### Spotify OAuth App
320
327
 
328
+ Can be used as a standalone mode, but also as a secondary mode to either a `cookie` or `client` token source method to retrieve playlist and user information (required due to restrictions introduced by Spotify on December 22, 2025).
329
+
321
330
  This method uses an official Spotify Web API (Client Credentials OAuth flow).
322
331
 
323
- - Log in to Spotify Developer dashboard: https://developer.spotify.com/dashboard
332
+ To obtain the credentials:
333
+
334
+ - Log in to [Spotify Developer dashboard](https://developer.spotify.com/dashboard)
324
335
 
325
336
  - Create a new app
326
337
 
327
- - For **Redirect URL**, use: http://127.0.0.1:1234
328
- - The URL must match exactly as shown, including not having a / at the end
329
- - When copying the link via right-click, some browsers may add an extra / to the URL
338
+ - For **Redirect URL**, use: `http://127.0.0.1:1234`
339
+ - The URL must match exactly as shown, including not having a `/` at the end
340
+ - When copying the link via right-click, some browsers may add an extra `/` to the URL
330
341
 
331
342
  - Select **Web API** as the intended API
332
343
 
333
344
  - Copy the **Client ID** and **Client Secret**
334
345
 
335
346
  - Provide the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` secrets using one of the following methods:
336
- - Pass it at runtime with `-r` / `--oauth-app-creds`
337
- - Use `SP_APP_CLIENT_ID`:`SP_APP_CLIENT_SECRET` format - note the colon separator
347
+ - Pass it at runtime with `-r` / `--oauth-app-creds` (use `SP_APP_CLIENT_ID:SP_APP_CLIENT_SECRET` format - note the colon separator)
338
348
  - Set it as an [environment variable](#storing-secrets) (e.g. `export SP_APP_CLIENT_ID=...; export SP_APP_CLIENT_SECRET=...`)
339
349
  - Add it to [.env file](#storing-secrets) (`SP_APP_CLIENT_ID=...` and `SP_APP_CLIENT_SECRET=...`) for persistent use
340
350
  - Fallback: hard-code it in the code or config file
341
351
 
342
- You can use the same client ID and secret values as those used for the [Spotify OAuth User](#spotify-oauth-user).
343
-
344
352
  Example:
345
353
 
346
354
  ```sh
347
355
  spotify_profile_monitor --token-source oauth_app -r "your_spotify_app_client_id:your_spotify_app_client_secret" <spotify_user_uri_id>
348
356
  ```
349
357
 
350
- The tool takes care of refreshing the access token so it should remain valid indefinitely.
358
+ The tool automatically refreshes the OAuth app access token, so it remains valid indefinitely. Tokens are cached in the file specified by `SP_APP_TOKENS_FILE` configuration option (default: `.spotify-profile-monitor-oauth-app.json`).
351
359
 
352
360
  If you store the `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` in a dotenv file you can update their values and send a `SIGHUP` signal to reload the file with the new secret values without restarting the tool. More info in [Storing Secrets](#storing-secrets) and [Signal Controls (macOS/Linux/Unix)](#signal-controls-macoslinuxunix).
353
361
 
362
+ You can also use this method as a standalone token source (without `cookie` or `client`) by setting `TOKEN_SOURCE` to `oauth_app`, but this has several limitations as described in the [Spotify access token source](#spotify-access-token-source) section.
363
+
354
364
  <a id="spotify-oauth-user"></a>
355
365
  #### Spotify OAuth User
356
366
 
@@ -529,6 +539,14 @@ If you use the default method to obtain a Spotify access token (`cookie`) and ha
529
539
  spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value"
530
540
  ```
531
541
 
542
+ **Note:** OAuth app credentials are now required for playlist and user information retrieval. If you haven't set `SP_APP_CLIENT_ID` and `SP_APP_CLIENT_SECRET` via environment variables or `.env` file, you can use the `-r` flag:
543
+
544
+ ```sh
545
+ spotify_profile_monitor <spotify_user_uri_id> -u "your_sp_dc_cookie_value" -r "your_spotify_app_client_id:your_spotify_app_client_secret"
546
+ ```
547
+
548
+ See [Spotify OAuth App](#spotify-oauth-app) for detailed setup instructions.
549
+
532
550
  By default, the tool looks for a configuration file named `spotify_profile_monitor.conf` in:
533
551
  - current directory
534
552
  - home directory (`~`)
@@ -661,12 +679,6 @@ If you want to display a list of recently played artists (this feature only work
661
679
  spotify_profile_monitor <spotify_user_uri_id> -a
662
680
  ```
663
681
 
664
- To get basic information about the Spotify access token owner (`-v` flag):
665
-
666
- ```sh
667
- spotify_profile_monitor -v
668
- ```
669
-
670
682
  If you want to search the Spotify catalog for users with a specific name to obtain their Spotify user URI ID (`-s` flag):
671
683
 
672
684
  ```sh
@@ -873,7 +885,7 @@ You should get a valid Spotify access token, example output:
873
885
  <img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_totp_test.png" alt="spotify_monitor_totp_test" width="100%"/>
874
886
  </p>
875
887
 
876
- > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every two days; you can either run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [here](#secret-key-extraction-from-spotify-web-player-bundles) for more info) or you can pass `--fetch-secrets` flag in `spotify_monitor_totp_test` (available since v1.6). There is also a [xyloflake/spot-secrets-go/](https://github.com/xyloflake/spot-secrets-go/) repo which offers JSON files that are automatically updated with current secrets (you can pass `--download-secrets` flag in `spotify_monitor_totp_test` to get it automatically from remote URL, available since v1.8).
888
+ > **NOTE:** secrets used for TOTP generation (`SECRET_CIPHER_DICT`) expire every few days; you can either run the [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) and extract it by yourself (see [here](#secret-key-extraction-from-spotify-web-player-bundles) for more info) or you can pass `--fetch-secrets` flag in `spotify_monitor_totp_test` (available since v1.6). There is also a [xyloflake/spot-secrets-go/](https://github.com/xyloflake/spot-secrets-go/) repo which offers JSON files that are automatically updated with current secrets (you can pass `--download-secrets` flag in `spotify_monitor_totp_test` to get it automatically from remote URL, available since v1.8).
877
889
 
878
890
  <a id="secret-key-extraction-from-spotify-web-player-bundles"></a>
879
891
  ### Secret Key Extraction from Spotify Web Player Bundles
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "spotify_profile_monitor"
7
- version = "3.0"
8
- description = "Tool implementing real-time tracking of Spotify users activities and profile changes including playlists"
7
+ version = "3.2"
8
+ description = "Track Spotify profile, follower and playlist changes in real time"
9
9
  readme = "README.md"
10
10
  license = "GPL-3.0-or-later"
11
11
  license-files = ["LICEN[CS]E*"]
@@ -24,6 +24,15 @@ dependencies = [
24
24
  ]
25
25
  classifiers = [
26
26
  "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.6",
28
+ "Programming Language :: Python :: 3.7",
29
+ "Programming Language :: Python :: 3.8",
30
+ "Programming Language :: Python :: 3.9",
31
+ "Programming Language :: Python :: 3.10",
32
+ "Programming Language :: Python :: 3.11",
33
+ "Programming Language :: Python :: 3.12",
34
+ "Programming Language :: Python :: 3.13",
35
+ "Programming Language :: Python :: 3.14",
27
36
  "Operating System :: OS Independent",
28
37
  "Operating System :: Microsoft :: Windows",
29
38
  "Operating System :: POSIX :: Linux",