Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canvasgrab

Download Spotify Canvas videos (the looping clips behind songs) as MP4 or GIF.

PARTYNEXTDOOR - DIE TRYING Lil Tecca - When You Down (with Polo G feat  Lil Durk)

Install

macOS

git clone https://github.com/1lent/canvasgrab.git
cd canvasgrab
pip3 install -r requirements.txt
brew install ffmpeg                       # optional, for GIFs
sudo python3 canvasgrab.py --install      # symlinks to /usr/local/bin

Windows

git clone https://github.com/1lent/canvasgrab.git
cd canvasgrab
pip install -r requirements.txt
winget install ffmpeg                     # optional, for GIFs

Usage

canvasgrab --sp-dc "<cookie>"              # manual cookie (any platform)
canvasgrab                                 # current Spotify track (macOS)
canvasgrab "spotify:track:3OHfY..."         # any track by URI
canvasgrab "https://open.spotify.com/track/3OHfY..."  # by share URL
canvasgrab --gif                            # also create a GIF
canvasgrab --open                           # open file after download
canvasgrab --verbose                        # debug API responses

Files land in ~/canvasgrab/.

Getting your sp_dc cookie

canvasgrab needs your Spotify sp_dc cookie. On macOS it auto-detects from Chrome, Brave, Edge, Firefox, Safari, Discord, or Cursor. On Windows, provide it manually:

  1. Go to open.spotify.com and log in
  2. Open DevTools (F12) → ApplicationCookiesopen.spotify.com
  3. Copy the value of the sp_dc cookie

Windows (PowerShell):

$env:SP_DC = "<your_cookie>"
python canvasgrab.py "spotify:track:3OHfY25tqY28d16oZczHc8"

Windows (cmd — persistent):

setx SP_DC "<your_cookie>"

macOS / Linux:

export SP_DC="<your_cookie>"
canvasgrab

Or pass it inline on any platform:

canvasgrab --sp-dc "<your_cookie>" "spotify:track:3OHfY25tqY28d16oZczHc8"

How it works

canvasgrab auto-detects your Spotify sp_dc cookie from Chrome, Brave, Edge, Firefox, Safari, Discord, or Cursor. On macOS it decrypts Chromium cookies via the Keychain. If no browser cookies exist, it falls back to the Spotify desktop app's LevelDB cache.

Acknowledgements

License

MIT

About

Zero-touch CLI tool to download Spotify Canvas looping videos as MP4 or GIF. Auto-detects current track on macOS. No API keys needed.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages