spotify-profile-monitor 2.7__tar.gz → 2.8__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.7 → spotify_profile_monitor-2.8}/PKG-INFO +101 -9
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/README.md +100 -8
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/pyproject.toml +1 -1
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.egg-info/PKG-INFO +101 -9
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.py +68 -26
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/LICENSE +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/setup.cfg +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.egg-info/SOURCES.txt +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.egg-info/dependency_links.txt +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.egg-info/entry_points.txt +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/spotify_profile_monitor.egg-info/requires.txt +0 -0
- {spotify_profile_monitor-2.7 → spotify_profile_monitor-2.8}/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.
|
|
3
|
+
Version: 2.8
|
|
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
|
|
@@ -96,7 +96,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
96
96
|
* [Access Token Retrieval via sp_dc Cookie and TOTP](#access-token-retrieval-via-sp_dc-cookie-and-totp)
|
|
97
97
|
* [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles)
|
|
98
98
|
7. [Change Log](#change-log)
|
|
99
|
-
8. [
|
|
99
|
+
8. [Maintainers](#maintainers)
|
|
100
|
+
9. [License](#license)
|
|
100
101
|
|
|
101
102
|
<a id="requirements"></a>
|
|
102
103
|
## Requirements
|
|
@@ -106,8 +107,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
106
107
|
|
|
107
108
|
Tested on:
|
|
108
109
|
|
|
109
|
-
* **macOS**: Ventura, Sonoma, Sequoia
|
|
110
|
-
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm), Ubuntu 24, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
110
|
+
* **macOS**: Ventura, Sonoma, Sequoia, Tahoe
|
|
111
|
+
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm, Trixie), Ubuntu 24/25, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
111
112
|
* **Windows**: 10, 11
|
|
112
113
|
|
|
113
114
|
It should work on other versions of macOS, Linux, Unix and Windows as well.
|
|
@@ -309,6 +310,8 @@ This method uses an official Spotify Web API (Client Credentials OAuth flow).
|
|
|
309
310
|
- Create a new app
|
|
310
311
|
|
|
311
312
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
313
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
314
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
312
315
|
|
|
313
316
|
- Select **Web API** as the intended API
|
|
314
317
|
|
|
@@ -343,6 +346,8 @@ This method uses an official Spotify Web API (Authorization Code OAuth flow).
|
|
|
343
346
|
- Create a new app
|
|
344
347
|
|
|
345
348
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
349
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
350
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
346
351
|
|
|
347
352
|
- Select **Web API** as the intended API
|
|
348
353
|
|
|
@@ -362,7 +367,7 @@ You can use the same client ID and secret values as those used for the [Spotify
|
|
|
362
367
|
Example:
|
|
363
368
|
|
|
364
369
|
```sh
|
|
365
|
-
spotify_profile_monitor --token-source oauth_user -
|
|
370
|
+
spotify_profile_monitor --token-source oauth_user -n "your_spotify_user_client_id:your_spotify_user_client_secret" <spotify_user_uri_id>
|
|
366
371
|
```
|
|
367
372
|
|
|
368
373
|
The tool takes care of refreshing the access token so it should remain valid indefinitely.
|
|
@@ -853,13 +858,15 @@ You should get a valid Spotify access token, example output:
|
|
|
853
858
|
<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%"/>
|
|
854
859
|
</p>
|
|
855
860
|
|
|
856
|
-
> **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
|
|
861
|
+
> **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).
|
|
857
862
|
|
|
858
863
|
<a id="secret-key-extraction-from-spotify-web-player-bundles"></a>
|
|
859
864
|
### Secret Key Extraction from Spotify Web Player Bundles
|
|
860
865
|
|
|
861
866
|
The [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) tool automatically extracts secret keys used for TOTP generation in Spotify Web Player JavaScript bundles.
|
|
862
867
|
|
|
868
|
+
> 💡 **Quick tip:** The easiest and recommended way to run this tool is via Docker. Jump directly to the [Docker usage section below](#-secret-key-extraction-via-docker-recommended-easiest-way).
|
|
869
|
+
|
|
863
870
|
Download from [here](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) or:
|
|
864
871
|
|
|
865
872
|
```sh
|
|
@@ -873,7 +880,7 @@ pip install playwright
|
|
|
873
880
|
playwright install
|
|
874
881
|
```
|
|
875
882
|
|
|
876
|
-
Run:
|
|
883
|
+
Run interactively (default output mode):
|
|
877
884
|
|
|
878
885
|
```sh
|
|
879
886
|
python3 spotify_monitor_secret_grabber.py
|
|
@@ -885,15 +892,100 @@ You should get output similar to below:
|
|
|
885
892
|
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_secret_grabber.png" alt="spotify_monitor_secret_grabber" width="100%"/>
|
|
886
893
|
</p>
|
|
887
894
|
|
|
888
|
-
|
|
895
|
+
Show help:
|
|
896
|
+
```sh
|
|
897
|
+
python3 spotify_monitor_secret_grabber.py -h
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
---
|
|
901
|
+
|
|
902
|
+
<a id="cli-output-modes"></a>
|
|
903
|
+
### CLI Output Modes
|
|
904
|
+
|
|
905
|
+
The script supports several output modes for different use cases:
|
|
906
|
+
|
|
907
|
+
| Flag | Description | Output |
|
|
908
|
+
|------|--------------|--------|
|
|
909
|
+
| `--secret` | Prints plain JSON array of extracted secrets | `[{"version": X, "secret": "..."}, ...]` |
|
|
910
|
+
| `--secretbytes` | Prints JSON array with ASCII byte values | `[{"version": X, "secret": [..]}, ...]` |
|
|
911
|
+
| `--secretdict` | Prints JSON object/dict mapping version → byte list | `{"X": [..], "Y": [..]}` |
|
|
912
|
+
| `--all` | Extracts secrets and **writes all three outputs** to local files | `secrets.json`, `secretBytes.json`, `secretDict.json` |
|
|
913
|
+
|
|
914
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
915
|
+
|
|
916
|
+
```sh
|
|
917
|
+
python3 spotify_monitor_secret_grabber.py --secretdict > secretDict.json
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
921
|
+
|
|
922
|
+
```sh
|
|
923
|
+
python3 spotify_monitor_secret_grabber.py --all
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
Default file paths and names can be configured directly in the `OUTPUT_FILES` dictionary at the top of the script.
|
|
927
|
+
|
|
928
|
+
---
|
|
929
|
+
|
|
930
|
+
<a id="-secret-key-extraction-via-docker-recommended-easiest-way"></a>
|
|
931
|
+
### 🐳 Secret Key Extraction via Docker (Recommended Easiest Way)
|
|
932
|
+
|
|
933
|
+
A prebuilt multi-architecture image is available on Docker Hub: [`misiektoja/spotify-secrets-grabber`](https://hub.docker.com/r/misiektoja/spotify-secrets-grabber)
|
|
934
|
+
|
|
935
|
+
This image works on:
|
|
936
|
+
- macOS (Intel & Apple Silicon)
|
|
937
|
+
- Linux (x86_64 and ARM64)
|
|
938
|
+
- Windows (Docker Desktop / WSL2)
|
|
939
|
+
- Raspberry Pi 4/5 (64-bit OS)
|
|
940
|
+
|
|
941
|
+
Run interactively (default output mode):
|
|
889
942
|
|
|
890
|
-
|
|
943
|
+
```sh
|
|
944
|
+
docker run --rm misiektoja/spotify-secrets-grabber
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Show help:
|
|
948
|
+
```sh
|
|
949
|
+
docker run --rm misiektoja/spotify-secrets-grabber -h
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
953
|
+
```sh
|
|
954
|
+
docker run --rm misiektoja/spotify-secrets-grabber --secretdict > secretDict.json
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
958
|
+
|
|
959
|
+
```sh
|
|
960
|
+
docker run --rm -v .:/work -w /work misiektoja/spotify-secrets-grabber --all
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
*For SELinux hosts (Fedora/RHEL), use `-v .:/work:Z`.*
|
|
964
|
+
|
|
965
|
+
<a id="optional-use-docker-compose-one-command-for-all-oss"></a>
|
|
966
|
+
Or optionally use Docker Compose (a preconfigured [compose.yaml](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber_docker/compose.yaml) file is included in the repo):
|
|
967
|
+
|
|
968
|
+
```sh
|
|
969
|
+
docker compose run --rm spotify-secrets-grabber --all
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
This will save all files into your current directory on any system (macOS, Linux or Windows).
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
You can now update the secrets used for TOTP generation (for example `SECRET_CIPHER_DICT` in `spotify_monitor_totp_test`, `spotify_monitor` and `spotify_profile_monitor`) either manually or by referencing an external `secretDict.json` file, which can be hosted in another repo or stored locally. See the description of `SECRET_CIPHER_DICT_URL` in those files for details.
|
|
891
977
|
|
|
892
978
|
<a id="change-log"></a>
|
|
893
979
|
## Change Log
|
|
894
980
|
|
|
895
981
|
See [RELEASE_NOTES.md](https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md) for details.
|
|
896
982
|
|
|
983
|
+
<a id="maintainers"></a>
|
|
984
|
+
## Maintainers
|
|
985
|
+
|
|
986
|
+
[](https://github.com/misiektoja)
|
|
987
|
+
[](https://github.com/tomballgithub)
|
|
988
|
+
|
|
897
989
|
<a id="license"></a>
|
|
898
990
|
## License
|
|
899
991
|
|
|
@@ -67,7 +67,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
67
67
|
* [Access Token Retrieval via sp_dc Cookie and TOTP](#access-token-retrieval-via-sp_dc-cookie-and-totp)
|
|
68
68
|
* [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles)
|
|
69
69
|
7. [Change Log](#change-log)
|
|
70
|
-
8. [
|
|
70
|
+
8. [Maintainers](#maintainers)
|
|
71
|
+
9. [License](#license)
|
|
71
72
|
|
|
72
73
|
<a id="requirements"></a>
|
|
73
74
|
## Requirements
|
|
@@ -77,8 +78,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
77
78
|
|
|
78
79
|
Tested on:
|
|
79
80
|
|
|
80
|
-
* **macOS**: Ventura, Sonoma, Sequoia
|
|
81
|
-
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm), Ubuntu 24, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
81
|
+
* **macOS**: Ventura, Sonoma, Sequoia, Tahoe
|
|
82
|
+
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm, Trixie), Ubuntu 24/25, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
82
83
|
* **Windows**: 10, 11
|
|
83
84
|
|
|
84
85
|
It should work on other versions of macOS, Linux, Unix and Windows as well.
|
|
@@ -280,6 +281,8 @@ This method uses an official Spotify Web API (Client Credentials OAuth flow).
|
|
|
280
281
|
- Create a new app
|
|
281
282
|
|
|
282
283
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
284
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
285
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
283
286
|
|
|
284
287
|
- Select **Web API** as the intended API
|
|
285
288
|
|
|
@@ -314,6 +317,8 @@ This method uses an official Spotify Web API (Authorization Code OAuth flow).
|
|
|
314
317
|
- Create a new app
|
|
315
318
|
|
|
316
319
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
320
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
321
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
317
322
|
|
|
318
323
|
- Select **Web API** as the intended API
|
|
319
324
|
|
|
@@ -333,7 +338,7 @@ You can use the same client ID and secret values as those used for the [Spotify
|
|
|
333
338
|
Example:
|
|
334
339
|
|
|
335
340
|
```sh
|
|
336
|
-
spotify_profile_monitor --token-source oauth_user -
|
|
341
|
+
spotify_profile_monitor --token-source oauth_user -n "your_spotify_user_client_id:your_spotify_user_client_secret" <spotify_user_uri_id>
|
|
337
342
|
```
|
|
338
343
|
|
|
339
344
|
The tool takes care of refreshing the access token so it should remain valid indefinitely.
|
|
@@ -824,13 +829,15 @@ You should get a valid Spotify access token, example output:
|
|
|
824
829
|
<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%"/>
|
|
825
830
|
</p>
|
|
826
831
|
|
|
827
|
-
> **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
|
|
832
|
+
> **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).
|
|
828
833
|
|
|
829
834
|
<a id="secret-key-extraction-from-spotify-web-player-bundles"></a>
|
|
830
835
|
### Secret Key Extraction from Spotify Web Player Bundles
|
|
831
836
|
|
|
832
837
|
The [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) tool automatically extracts secret keys used for TOTP generation in Spotify Web Player JavaScript bundles.
|
|
833
838
|
|
|
839
|
+
> 💡 **Quick tip:** The easiest and recommended way to run this tool is via Docker. Jump directly to the [Docker usage section below](#-secret-key-extraction-via-docker-recommended-easiest-way).
|
|
840
|
+
|
|
834
841
|
Download from [here](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) or:
|
|
835
842
|
|
|
836
843
|
```sh
|
|
@@ -844,7 +851,7 @@ pip install playwright
|
|
|
844
851
|
playwright install
|
|
845
852
|
```
|
|
846
853
|
|
|
847
|
-
Run:
|
|
854
|
+
Run interactively (default output mode):
|
|
848
855
|
|
|
849
856
|
```sh
|
|
850
857
|
python3 spotify_monitor_secret_grabber.py
|
|
@@ -856,15 +863,100 @@ You should get output similar to below:
|
|
|
856
863
|
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_secret_grabber.png" alt="spotify_monitor_secret_grabber" width="100%"/>
|
|
857
864
|
</p>
|
|
858
865
|
|
|
859
|
-
|
|
866
|
+
Show help:
|
|
867
|
+
```sh
|
|
868
|
+
python3 spotify_monitor_secret_grabber.py -h
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
---
|
|
872
|
+
|
|
873
|
+
<a id="cli-output-modes"></a>
|
|
874
|
+
### CLI Output Modes
|
|
875
|
+
|
|
876
|
+
The script supports several output modes for different use cases:
|
|
877
|
+
|
|
878
|
+
| Flag | Description | Output |
|
|
879
|
+
|------|--------------|--------|
|
|
880
|
+
| `--secret` | Prints plain JSON array of extracted secrets | `[{"version": X, "secret": "..."}, ...]` |
|
|
881
|
+
| `--secretbytes` | Prints JSON array with ASCII byte values | `[{"version": X, "secret": [..]}, ...]` |
|
|
882
|
+
| `--secretdict` | Prints JSON object/dict mapping version → byte list | `{"X": [..], "Y": [..]}` |
|
|
883
|
+
| `--all` | Extracts secrets and **writes all three outputs** to local files | `secrets.json`, `secretBytes.json`, `secretDict.json` |
|
|
884
|
+
|
|
885
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
886
|
+
|
|
887
|
+
```sh
|
|
888
|
+
python3 spotify_monitor_secret_grabber.py --secretdict > secretDict.json
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
892
|
+
|
|
893
|
+
```sh
|
|
894
|
+
python3 spotify_monitor_secret_grabber.py --all
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
Default file paths and names can be configured directly in the `OUTPUT_FILES` dictionary at the top of the script.
|
|
898
|
+
|
|
899
|
+
---
|
|
900
|
+
|
|
901
|
+
<a id="-secret-key-extraction-via-docker-recommended-easiest-way"></a>
|
|
902
|
+
### 🐳 Secret Key Extraction via Docker (Recommended Easiest Way)
|
|
903
|
+
|
|
904
|
+
A prebuilt multi-architecture image is available on Docker Hub: [`misiektoja/spotify-secrets-grabber`](https://hub.docker.com/r/misiektoja/spotify-secrets-grabber)
|
|
905
|
+
|
|
906
|
+
This image works on:
|
|
907
|
+
- macOS (Intel & Apple Silicon)
|
|
908
|
+
- Linux (x86_64 and ARM64)
|
|
909
|
+
- Windows (Docker Desktop / WSL2)
|
|
910
|
+
- Raspberry Pi 4/5 (64-bit OS)
|
|
911
|
+
|
|
912
|
+
Run interactively (default output mode):
|
|
860
913
|
|
|
861
|
-
|
|
914
|
+
```sh
|
|
915
|
+
docker run --rm misiektoja/spotify-secrets-grabber
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
Show help:
|
|
919
|
+
```sh
|
|
920
|
+
docker run --rm misiektoja/spotify-secrets-grabber -h
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
924
|
+
```sh
|
|
925
|
+
docker run --rm misiektoja/spotify-secrets-grabber --secretdict > secretDict.json
|
|
926
|
+
```
|
|
927
|
+
|
|
928
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
929
|
+
|
|
930
|
+
```sh
|
|
931
|
+
docker run --rm -v .:/work -w /work misiektoja/spotify-secrets-grabber --all
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
*For SELinux hosts (Fedora/RHEL), use `-v .:/work:Z`.*
|
|
935
|
+
|
|
936
|
+
<a id="optional-use-docker-compose-one-command-for-all-oss"></a>
|
|
937
|
+
Or optionally use Docker Compose (a preconfigured [compose.yaml](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber_docker/compose.yaml) file is included in the repo):
|
|
938
|
+
|
|
939
|
+
```sh
|
|
940
|
+
docker compose run --rm spotify-secrets-grabber --all
|
|
941
|
+
```
|
|
942
|
+
|
|
943
|
+
This will save all files into your current directory on any system (macOS, Linux or Windows).
|
|
944
|
+
|
|
945
|
+
---
|
|
946
|
+
|
|
947
|
+
You can now update the secrets used for TOTP generation (for example `SECRET_CIPHER_DICT` in `spotify_monitor_totp_test`, `spotify_monitor` and `spotify_profile_monitor`) either manually or by referencing an external `secretDict.json` file, which can be hosted in another repo or stored locally. See the description of `SECRET_CIPHER_DICT_URL` in those files for details.
|
|
862
948
|
|
|
863
949
|
<a id="change-log"></a>
|
|
864
950
|
## Change Log
|
|
865
951
|
|
|
866
952
|
See [RELEASE_NOTES.md](https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md) for details.
|
|
867
953
|
|
|
954
|
+
<a id="maintainers"></a>
|
|
955
|
+
## Maintainers
|
|
956
|
+
|
|
957
|
+
[](https://github.com/misiektoja)
|
|
958
|
+
[](https://github.com/tomballgithub)
|
|
959
|
+
|
|
868
960
|
<a id="license"></a>
|
|
869
961
|
## License
|
|
870
962
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "spotify_profile_monitor"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.8"
|
|
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.
|
|
3
|
+
Version: 2.8
|
|
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
|
|
@@ -96,7 +96,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
96
96
|
* [Access Token Retrieval via sp_dc Cookie and TOTP](#access-token-retrieval-via-sp_dc-cookie-and-totp)
|
|
97
97
|
* [Secret Key Extraction from Spotify Web Player Bundles](#secret-key-extraction-from-spotify-web-player-bundles)
|
|
98
98
|
7. [Change Log](#change-log)
|
|
99
|
-
8. [
|
|
99
|
+
8. [Maintainers](#maintainers)
|
|
100
|
+
9. [License](#license)
|
|
100
101
|
|
|
101
102
|
<a id="requirements"></a>
|
|
102
103
|
## Requirements
|
|
@@ -106,8 +107,8 @@ OSINT tool for real-time monitoring of **Spotify users' activities and profile c
|
|
|
106
107
|
|
|
107
108
|
Tested on:
|
|
108
109
|
|
|
109
|
-
* **macOS**: Ventura, Sonoma, Sequoia
|
|
110
|
-
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm), Ubuntu 24, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
110
|
+
* **macOS**: Ventura, Sonoma, Sequoia, Tahoe
|
|
111
|
+
* **Linux**: Raspberry Pi OS (Bullseye, Bookworm, Trixie), Ubuntu 24/25, Rocky Linux 8.x/9.x, Kali Linux 2024/2025
|
|
111
112
|
* **Windows**: 10, 11
|
|
112
113
|
|
|
113
114
|
It should work on other versions of macOS, Linux, Unix and Windows as well.
|
|
@@ -309,6 +310,8 @@ This method uses an official Spotify Web API (Client Credentials OAuth flow).
|
|
|
309
310
|
- Create a new app
|
|
310
311
|
|
|
311
312
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
313
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
314
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
312
315
|
|
|
313
316
|
- Select **Web API** as the intended API
|
|
314
317
|
|
|
@@ -343,6 +346,8 @@ This method uses an official Spotify Web API (Authorization Code OAuth flow).
|
|
|
343
346
|
- Create a new app
|
|
344
347
|
|
|
345
348
|
- For **Redirect URL**, use: http://127.0.0.1:1234
|
|
349
|
+
- The URL must match exactly as shown, including not having a / at the end
|
|
350
|
+
- When copying the link via right-click, some browsers may add an extra / to the URL
|
|
346
351
|
|
|
347
352
|
- Select **Web API** as the intended API
|
|
348
353
|
|
|
@@ -362,7 +367,7 @@ You can use the same client ID and secret values as those used for the [Spotify
|
|
|
362
367
|
Example:
|
|
363
368
|
|
|
364
369
|
```sh
|
|
365
|
-
spotify_profile_monitor --token-source oauth_user -
|
|
370
|
+
spotify_profile_monitor --token-source oauth_user -n "your_spotify_user_client_id:your_spotify_user_client_secret" <spotify_user_uri_id>
|
|
366
371
|
```
|
|
367
372
|
|
|
368
373
|
The tool takes care of refreshing the access token so it should remain valid indefinitely.
|
|
@@ -853,13 +858,15 @@ You should get a valid Spotify access token, example output:
|
|
|
853
858
|
<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%"/>
|
|
854
859
|
</p>
|
|
855
860
|
|
|
856
|
-
> **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
|
|
861
|
+
> **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).
|
|
857
862
|
|
|
858
863
|
<a id="secret-key-extraction-from-spotify-web-player-bundles"></a>
|
|
859
864
|
### Secret Key Extraction from Spotify Web Player Bundles
|
|
860
865
|
|
|
861
866
|
The [spotify_monitor_secret_grabber](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) tool automatically extracts secret keys used for TOTP generation in Spotify Web Player JavaScript bundles.
|
|
862
867
|
|
|
868
|
+
> 💡 **Quick tip:** The easiest and recommended way to run this tool is via Docker. Jump directly to the [Docker usage section below](#-secret-key-extraction-via-docker-recommended-easiest-way).
|
|
869
|
+
|
|
863
870
|
Download from [here](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber.py) or:
|
|
864
871
|
|
|
865
872
|
```sh
|
|
@@ -873,7 +880,7 @@ pip install playwright
|
|
|
873
880
|
playwright install
|
|
874
881
|
```
|
|
875
882
|
|
|
876
|
-
Run:
|
|
883
|
+
Run interactively (default output mode):
|
|
877
884
|
|
|
878
885
|
```sh
|
|
879
886
|
python3 spotify_monitor_secret_grabber.py
|
|
@@ -885,15 +892,100 @@ You should get output similar to below:
|
|
|
885
892
|
<img src="https://raw.githubusercontent.com/misiektoja/spotify_monitor/refs/heads/main/assets/spotify_monitor_secret_grabber.png" alt="spotify_monitor_secret_grabber" width="100%"/>
|
|
886
893
|
</p>
|
|
887
894
|
|
|
888
|
-
|
|
895
|
+
Show help:
|
|
896
|
+
```sh
|
|
897
|
+
python3 spotify_monitor_secret_grabber.py -h
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
---
|
|
901
|
+
|
|
902
|
+
<a id="cli-output-modes"></a>
|
|
903
|
+
### CLI Output Modes
|
|
904
|
+
|
|
905
|
+
The script supports several output modes for different use cases:
|
|
906
|
+
|
|
907
|
+
| Flag | Description | Output |
|
|
908
|
+
|------|--------------|--------|
|
|
909
|
+
| `--secret` | Prints plain JSON array of extracted secrets | `[{"version": X, "secret": "..."}, ...]` |
|
|
910
|
+
| `--secretbytes` | Prints JSON array with ASCII byte values | `[{"version": X, "secret": [..]}, ...]` |
|
|
911
|
+
| `--secretdict` | Prints JSON object/dict mapping version → byte list | `{"X": [..], "Y": [..]}` |
|
|
912
|
+
| `--all` | Extracts secrets and **writes all three outputs** to local files | `secrets.json`, `secretBytes.json`, `secretDict.json` |
|
|
913
|
+
|
|
914
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
915
|
+
|
|
916
|
+
```sh
|
|
917
|
+
python3 spotify_monitor_secret_grabber.py --secretdict > secretDict.json
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
921
|
+
|
|
922
|
+
```sh
|
|
923
|
+
python3 spotify_monitor_secret_grabber.py --all
|
|
924
|
+
```
|
|
925
|
+
|
|
926
|
+
Default file paths and names can be configured directly in the `OUTPUT_FILES` dictionary at the top of the script.
|
|
927
|
+
|
|
928
|
+
---
|
|
929
|
+
|
|
930
|
+
<a id="-secret-key-extraction-via-docker-recommended-easiest-way"></a>
|
|
931
|
+
### 🐳 Secret Key Extraction via Docker (Recommended Easiest Way)
|
|
932
|
+
|
|
933
|
+
A prebuilt multi-architecture image is available on Docker Hub: [`misiektoja/spotify-secrets-grabber`](https://hub.docker.com/r/misiektoja/spotify-secrets-grabber)
|
|
934
|
+
|
|
935
|
+
This image works on:
|
|
936
|
+
- macOS (Intel & Apple Silicon)
|
|
937
|
+
- Linux (x86_64 and ARM64)
|
|
938
|
+
- Windows (Docker Desktop / WSL2)
|
|
939
|
+
- Raspberry Pi 4/5 (64-bit OS)
|
|
940
|
+
|
|
941
|
+
Run interactively (default output mode):
|
|
889
942
|
|
|
890
|
-
|
|
943
|
+
```sh
|
|
944
|
+
docker run --rm misiektoja/spotify-secrets-grabber
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
Show help:
|
|
948
|
+
```sh
|
|
949
|
+
docker run --rm misiektoja/spotify-secrets-grabber -h
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
Print extracted secrets in specific format, for example Python-friendly secret bytes (JSON object/dict) and save to indicated file:
|
|
953
|
+
```sh
|
|
954
|
+
docker run --rm misiektoja/spotify-secrets-grabber --secretdict > secretDict.json
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
Or, to generate and save all secret formats to files (`secrets.json`, `secretBytes.json`, `secretDict.json`) at once:
|
|
958
|
+
|
|
959
|
+
```sh
|
|
960
|
+
docker run --rm -v .:/work -w /work misiektoja/spotify-secrets-grabber --all
|
|
961
|
+
```
|
|
962
|
+
|
|
963
|
+
*For SELinux hosts (Fedora/RHEL), use `-v .:/work:Z`.*
|
|
964
|
+
|
|
965
|
+
<a id="optional-use-docker-compose-one-command-for-all-oss"></a>
|
|
966
|
+
Or optionally use Docker Compose (a preconfigured [compose.yaml](https://github.com/misiektoja/spotify_monitor/blob/dev/debug/spotify_monitor_secret_grabber_docker/compose.yaml) file is included in the repo):
|
|
967
|
+
|
|
968
|
+
```sh
|
|
969
|
+
docker compose run --rm spotify-secrets-grabber --all
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
This will save all files into your current directory on any system (macOS, Linux or Windows).
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
You can now update the secrets used for TOTP generation (for example `SECRET_CIPHER_DICT` in `spotify_monitor_totp_test`, `spotify_monitor` and `spotify_profile_monitor`) either manually or by referencing an external `secretDict.json` file, which can be hosted in another repo or stored locally. See the description of `SECRET_CIPHER_DICT_URL` in those files for details.
|
|
891
977
|
|
|
892
978
|
<a id="change-log"></a>
|
|
893
979
|
## Change Log
|
|
894
980
|
|
|
895
981
|
See [RELEASE_NOTES.md](https://github.com/misiektoja/spotify_profile_monitor/blob/main/RELEASE_NOTES.md) for details.
|
|
896
982
|
|
|
983
|
+
<a id="maintainers"></a>
|
|
984
|
+
## Maintainers
|
|
985
|
+
|
|
986
|
+
[](https://github.com/misiektoja)
|
|
987
|
+
[](https://github.com/tomballgithub)
|
|
988
|
+
|
|
897
989
|
<a id="license"></a>
|
|
898
990
|
## License
|
|
899
991
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
3
|
Author: Michal Szymanski <misiektoja-github@rm-rf.ninja>
|
|
4
|
-
v2.
|
|
4
|
+
v2.8
|
|
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/
|
|
@@ -19,7 +19,7 @@ spotipy (optional, needed when the token source is set to oauth_app)
|
|
|
19
19
|
wcwidth (optional, needed by TRUNCATE_CHARS feature)
|
|
20
20
|
"""
|
|
21
21
|
|
|
22
|
-
VERSION = "2.
|
|
22
|
+
VERSION = "2.8"
|
|
23
23
|
|
|
24
24
|
# ---------------------------
|
|
25
25
|
# CONFIGURATION SECTION START
|
|
@@ -261,19 +261,17 @@ TOKEN_RETRY_TIMEOUT = 0.5 # 0.5 second
|
|
|
261
261
|
# Newest secrets are downloaded automatically from SECRET_CIPHER_DICT_URL (see below)
|
|
262
262
|
# Can also be fetched via spotify_monitor_secret_grabber.py utility - see debug dir
|
|
263
263
|
SECRET_CIPHER_DICT = {
|
|
264
|
-
"12": [107, 81, 49, 57, 67, 93, 87, 81, 69, 67, 40, 93, 48, 50, 46, 91, 94, 113, 41, 108, 77, 107, 34],
|
|
265
|
-
"11": [111, 45, 40, 73, 95, 74, 35, 85, 105, 107, 60, 110, 55, 72, 69, 70, 114, 83, 63, 88, 91],
|
|
266
|
-
"10": [61, 110, 58, 98, 35, 79, 117, 69, 102, 72, 92, 102, 69, 93, 41, 101, 42, 75],
|
|
267
|
-
"9": [109, 101, 90, 99, 66, 92, 116, 108, 85, 70, 86, 49, 68, 54, 87, 50, 72, 121, 52, 64, 57, 43, 36, 81, 97, 72, 53, 41, 78, 56],
|
|
268
|
-
"8": [37, 84, 32, 76, 87, 90, 87, 47, 13, 75, 48, 54, 44, 28, 19, 21, 22],
|
|
269
|
-
"7": [59, 91, 66, 74, 30, 66, 74, 38, 46, 50, 72, 61, 44, 71, 86, 39, 89],
|
|
270
264
|
"6": [21, 24, 85, 46, 48, 35, 33, 8, 11, 63, 76, 12, 55, 77, 14, 7, 54],
|
|
271
265
|
"5": [12, 56, 76, 33, 88, 44, 88, 33, 78, 78, 11, 66, 22, 22, 55, 69, 54],
|
|
272
266
|
}
|
|
273
267
|
|
|
274
|
-
# Remote URL used to fetch updated secrets needed for TOTP generation
|
|
268
|
+
# Remote or local URL used to fetch updated secrets needed for TOTP generation
|
|
275
269
|
# Set to empty string to disable
|
|
276
|
-
|
|
270
|
+
# If you used "spotify_monitor_secret_grabber.py --secretdict > secretDict.json" specify the file location below
|
|
271
|
+
# SECRET_CIPHER_DICT_URL = "https://github.com/Thereallo1026/spotify-secrets/blob/main/secrets/secretDict.json?raw=true"
|
|
272
|
+
SECRET_CIPHER_DICT_URL = "https://github.com/xyloflake/spot-secrets-go/blob/main/secrets/secretDict.json?raw=true"
|
|
273
|
+
# SECRET_CIPHER_DICT_URL = file:///C:/your_path/secretDict.json
|
|
274
|
+
# SECRET_CIPHER_DICT_URL = "file:///your_path/secretDict.json"
|
|
277
275
|
|
|
278
276
|
# Identifier used to select the appropriate secret from SECRET_CIPHER_DICT when generating a TOTP token
|
|
279
277
|
# Set to 0 to auto-select the highest available version
|
|
@@ -1498,12 +1496,43 @@ def fetch_and_update_secrets():
|
|
|
1498
1496
|
return False
|
|
1499
1497
|
|
|
1500
1498
|
try:
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1499
|
+
if SECRET_CIPHER_DICT_URL.startswith("file:"):
|
|
1500
|
+
import os
|
|
1501
|
+
from urllib.parse import urlparse, unquote
|
|
1502
|
+
|
|
1503
|
+
parsed = urlparse(SECRET_CIPHER_DICT_URL)
|
|
1504
|
+
|
|
1505
|
+
if parsed.netloc:
|
|
1506
|
+
raw_path = f"/{parsed.netloc}{parsed.path or ''}"
|
|
1507
|
+
else:
|
|
1508
|
+
if SECRET_CIPHER_DICT_URL.startswith("file://"):
|
|
1509
|
+
raw_path = parsed.path or SECRET_CIPHER_DICT_URL[len("file://"):]
|
|
1510
|
+
else:
|
|
1511
|
+
raw_path = parsed.path or SECRET_CIPHER_DICT_URL[len("file:"):]
|
|
1512
|
+
|
|
1513
|
+
raw_path = unquote(raw_path)
|
|
1514
|
+
|
|
1515
|
+
if raw_path.startswith("/~"):
|
|
1516
|
+
raw_path = raw_path[1:]
|
|
1517
|
+
|
|
1518
|
+
if not raw_path.startswith("/") and not raw_path.startswith("~"):
|
|
1519
|
+
raw_path = "/" + raw_path
|
|
1520
|
+
|
|
1521
|
+
path = os.path.expanduser(os.path.expandvars(raw_path))
|
|
1522
|
+
|
|
1523
|
+
print(f"Loading Spotify web-player TOTP secrets from file: {path}")
|
|
1524
|
+
with open(path, "r", encoding="utf-8") as f:
|
|
1525
|
+
secrets = json.load(f)
|
|
1526
|
+
print("─" * HORIZONTAL_LINE)
|
|
1527
|
+
else:
|
|
1528
|
+
print(f"Fetching Spotify web-player TOTP secrets from URL: {SECRET_CIPHER_DICT_URL}")
|
|
1529
|
+
response = req.get(SECRET_CIPHER_DICT_URL, timeout=FUNCTION_TIMEOUT, verify=VERIFY_SSL)
|
|
1530
|
+
response.raise_for_status()
|
|
1531
|
+
secrets = response.json()
|
|
1532
|
+
print("─" * HORIZONTAL_LINE)
|
|
1504
1533
|
|
|
1505
1534
|
if not isinstance(secrets, dict) or not secrets:
|
|
1506
|
-
raise ValueError("fetch_and_update_secrets(): Fetched payload not a non
|
|
1535
|
+
raise ValueError("fetch_and_update_secrets(): Fetched payload not a non-empty dict")
|
|
1507
1536
|
|
|
1508
1537
|
for key, value in secrets.items():
|
|
1509
1538
|
if not isinstance(key, str) or not key.isdigit():
|
|
@@ -2520,7 +2549,12 @@ def is_token_owner(access_token, user_uri_id) -> bool:
|
|
|
2520
2549
|
|
|
2521
2550
|
# Returns detailed info about playlist with specified URI (with possibility to get its tracks as well)
|
|
2522
2551
|
def spotify_get_playlist_info(access_token, playlist_uri, get_tracks):
|
|
2523
|
-
|
|
2552
|
+
parts = playlist_uri.split(':')
|
|
2553
|
+
if len(parts) == 3:
|
|
2554
|
+
playlist_id = parts[2]
|
|
2555
|
+
else:
|
|
2556
|
+
playlist_id = "invalid_playlist"
|
|
2557
|
+
print(f"Invalid playlist format")
|
|
2524
2558
|
|
|
2525
2559
|
if get_tracks:
|
|
2526
2560
|
url1 = f"https://api.spotify.com/v1/playlists/{playlist_id}?fields=name,description,owner,followers,external_urls,tracks.total,collaborative,images"
|
|
@@ -2911,7 +2945,11 @@ def spotify_list_tracks_for_playlist(sp_accessToken, playlist_url, csv_file_name
|
|
|
2911
2945
|
user_id_name_mapping = {}
|
|
2912
2946
|
user_track_counts = Counter()
|
|
2913
2947
|
|
|
2914
|
-
|
|
2948
|
+
pattern = re.compile(r'^[a-zA-Z0-9]{22}$')
|
|
2949
|
+
if (pattern.match(playlist_url)):
|
|
2950
|
+
playlist_uri = f"::{playlist_url}"
|
|
2951
|
+
else:
|
|
2952
|
+
playlist_uri = spotify_convert_url_to_uri(playlist_url)
|
|
2915
2953
|
|
|
2916
2954
|
sp_playlist_data = spotify_get_playlist_info(sp_accessToken, playlist_uri, True)
|
|
2917
2955
|
|
|
@@ -5165,16 +5203,6 @@ def main():
|
|
|
5165
5203
|
|
|
5166
5204
|
args = parser.parse_args()
|
|
5167
5205
|
|
|
5168
|
-
if args.export_for_spotify_monitor:
|
|
5169
|
-
CLEAN_OUTPUT = True
|
|
5170
|
-
|
|
5171
|
-
if not CLEAN_OUTPUT:
|
|
5172
|
-
stdout_bck = sys.stdout
|
|
5173
|
-
|
|
5174
|
-
clear_screen(CLEAR_SCREEN)
|
|
5175
|
-
|
|
5176
|
-
print(f"Spotify Profile Monitoring Tool v{VERSION}\n")
|
|
5177
|
-
|
|
5178
5206
|
if len(sys.argv) == 1:
|
|
5179
5207
|
parser.print_help(sys.stderr)
|
|
5180
5208
|
sys.exit(1)
|
|
@@ -5229,6 +5257,20 @@ def main():
|
|
|
5229
5257
|
if val is not None:
|
|
5230
5258
|
globals()[secret] = val
|
|
5231
5259
|
|
|
5260
|
+
if args.export_for_spotify_monitor:
|
|
5261
|
+
if not args.list_tracks_for_playlist and not args.list_liked_tracks:
|
|
5262
|
+
print(f"* Error: The 'export for spotify monitor' feature is only supported with -l and -x command line options !")
|
|
5263
|
+
sys.exit(2)
|
|
5264
|
+
else:
|
|
5265
|
+
CLEAN_OUTPUT = True
|
|
5266
|
+
|
|
5267
|
+
if not CLEAN_OUTPUT:
|
|
5268
|
+
stdout_bck = sys.stdout
|
|
5269
|
+
|
|
5270
|
+
clear_screen(CLEAR_SCREEN)
|
|
5271
|
+
|
|
5272
|
+
print(f"Spotify Profile Monitoring Tool v{VERSION}\n")
|
|
5273
|
+
|
|
5232
5274
|
local_tz = None
|
|
5233
5275
|
if LOCAL_TIMEZONE == "Auto":
|
|
5234
5276
|
if get_localzone is not None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|