Compare commits
No commits in common. "ff36e65ed7a3e1415e25984c22bbb1708b87c819" and "1eadb444901566abc81c2a718174e63822c0ab67" have entirely different histories.
ff36e65ed7
...
1eadb44490
@ -2,7 +2,7 @@
|
|||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
BEARER_TOKEN_RES=$(
|
BEARER_TOKEN_RES=$(
|
||||||
curl -sL https://open.spotify.com/ \
|
curl -L https://open.spotify.com/ \
|
||||||
| grep 'id="session"' \
|
| grep 'id="session"' \
|
||||||
| sed 's&.*<script id="session"[^>]*>&&' \
|
| sed 's&.*<script id="session"[^>]*>&&' \
|
||||||
| sed 's/<.*//'
|
| sed 's/<.*//'
|
||||||
@ -11,7 +11,7 @@ BEARER_TOKEN=$(echo "$BEARER_TOKEN_RES" | jq -r .accessToken)
|
|||||||
export BEARER_TOKEN
|
export BEARER_TOKEN
|
||||||
|
|
||||||
GUEST_TOKEN_RES=$(
|
GUEST_TOKEN_RES=$(
|
||||||
curl -sX POST https://clienttoken.spotify.com/v1/clienttoken \
|
curl -X POST https://clienttoken.spotify.com/v1/clienttoken \
|
||||||
-H "Accept: application/json" -H "content-type: application/json" \
|
-H "Accept: application/json" -H "content-type: application/json" \
|
||||||
--data '{"client_data":{"client_version":"1.2.27.147.g503c721c","client_id":"d8a5ed958d274c2e8ee717e6a4b0971d","js_sdk_data":{"device_brand":"unknown","device_model":"unknown","os":"linux","os_version":"unknown","device_id":"nuhuh","device_type":"computer"}}}'
|
--data '{"client_data":{"client_version":"1.2.27.147.g503c721c","client_id":"d8a5ed958d274c2e8ee717e6a4b0971d","js_sdk_data":{"device_brand":"unknown","device_model":"unknown","os":"linux","os_version":"unknown","device_id":"nuhuh","device_type":"computer"}}}'
|
||||||
)
|
)
|
||||||
|
File diff suppressed because it is too large
Load Diff
1120
spotify/playlist.txt
1120
spotify/playlist.txt
File diff suppressed because it is too large
Load Diff
@ -26,8 +26,4 @@ done \
|
|||||||
| jq -s 'reduce .[] as $x ([]; . + $x)' \
|
| jq -s 'reduce .[] as $x ([]; . + $x)' \
|
||||||
| jq 'del(.. | .available_markets?, .added_by?, .popularity?)' > playlist.json
|
| jq 'del(.. | .available_markets?, .added_by?, .popularity?)' > playlist.json
|
||||||
|
|
||||||
printf "downloaded %s songs metadata\n" "$(jq length playlist.json)"
|
printf "downloaded %s songs metadata" "$(jq length playlist.json)"
|
||||||
|
|
||||||
jq -r '.[].track | ( .name + " - " + (.album.artists | map(.name) | join(", ")) )' playlist.json \
|
|
||||||
| pv > playlist.txt
|
|
||||||
printf "and dumped it as text on %s\n" playlist.txt
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user