Localify
A Python-powered CLI that turns public Spotify playlists into local MP3 collections using browser automation, YouTube search, and intelligent track matching — no Spotify API key or Premium subscription required.

A reason to build
Spotify playlists are convenient for organizing music, but accessing those collections as local audio files is not straightforward. Localify explores an automated workflow for extracting public playlist metadata and finding corresponding audio on YouTube, without requiring Spotify API credentials.
What I worked on
Developed a Python-based command-line utility that automates playlist extraction, track matching, and local audio downloads. Implemented headless browser scraping, lazy-loaded content handling, duration-based matching, MP3 conversion, and error-tolerant batch processing.
How the pieces fit
- Used Playwright with headless Chromium to navigate public Spotify playlist pages.
- Implemented automated scrolling to extract tracks from dynamically loaded playlists.
- Collected track titles, artists, albums, and durations without using the Spotify API.
- Integrated yt-dlp to search YouTube for corresponding audio.
- Compared Spotify and YouTube track durations to improve match accuracy.
- Used FFmpeg to extract and convert matched audio into MP3 files.
- Organized downloaded files using playlist position, artist, and song title.
- Added error handling to skip unmatched tracks and continue processing when individual downloads fail.
- Introduced randomized delays between downloads to reduce request frequency.
The detail that matters
Chose browser automation instead of Spotify's official API to experiment with extracting publicly available metadata directly from dynamic web pages. Used duration-based matching as a lightweight heuristic rather than introducing complex audio fingerprinting or external recognition services.
Where it stands
Built a locally runnable CLI that accepts a public Spotify playlist URL, extracts its tracks, searches for matching YouTube audio, and saves successful downloads as organized MP3 files. Published the source code and setup instructions on GitHub for local experimentation.
Learned how to automate dynamic websites, handle lazy-loaded content, integrate command-line tools, and build resilient multi-stage data pipelines. The project reinforced the importance of validating scraped data, handling partial failures, and understanding the limitations of heuristic matching.
Vidya Nepal
Have a useful problem to solve?
Let’s talk