🎧 dj-soundcloud-digger
A local-first playlist workflow for DJs. Turn SoundCloud playlists, likes, and artist profiles into an auditionable, searchable library, then find the safest available path to download or buy each track.
dj-soundcloud-digger keeps the whole digging loop in one terminal application:
collect a playlist, preview and filter it, mark decisions, match music already on
disk, and follow verified store or download links. Your library and preferences
stay on your machine, and checkout always stays in your hands.
The current implemented behavior, architecture, interfaces, data model, and security/privacy boundaries are maintained in PROJECT-SPECIFICATION.md.
dj-digger https://soundcloud.com/someone/sets/that-playlist
⚡ The workflow
- Collect complete playlists: SoundCloud API v2 reads playlists, likes, profiles, and individual tracks without relying on the page's finite rendered list. A saved-HTML fallback covers private and unlisted sources.
- Audition and narrow down: Preview, seek, search, filter, and sort tracks in the Textual interface without leaving the playlist.
- Remember every decision: Local playlists keep
got it/skippedstatus across playlists, refreshes identify new additions, and a library scan finds tracks already on disk. - Find the track, not just a link: Store, smart-link, and download-gate URLs are classified and expanded into useful Bandcamp, Beatport, shop, or download destinations.
- Acquire with guardrails: Download artist-provided files, resolve supported gates, verify Bandcamp products, or prepare a Beatport playlist. Ambiguous matches and checkout remain manual.
- Keep control locally: Playlists, decisions, credentials, and browser profiles remain on your machine; there is no project-hosted account or backend.
Additional capabilities
- API-first collection: A 300-track playlist can be read from SoundCloud in about three seconds using batch hydration. Following third-party purchase links takes as long as those providers take; a 484-track playlist is around a minute.
- Store and gate classification: Group links into Bandcamp, Beatport, Traxsource, JunoDownload, record shops, download gates, smart links, and direct SoundCloud downloads.
- In-memory audio preview: Stream, seek, prefetch upcoming tracks, and render
block waveforms with a reactive audio meter, powered by
miniaudio. - Multi-playlist local library: Save, switch, refresh, and search playlists stored in
~/.local/share/dj-digger/digger.db. - Cross-playlist track memory: A decision made for a SoundCloud track applies when that track appears in another playlist.
- 🔓 Download Gate Automation: Resolves follow-to-download gates (Hypeddit, ToneDen, GateRush, Droploud) through their supported download flows. SoundCloud, Instagram, YouTube and similar link steps are click-through markers: the app does not call their follow, like, repost, comment APIs or open external social links to simulate a click. A gate may receive the name or email configured in Settings when its manifest requires them. Spotify steps are reported like the other click-throughs: Hypeddit clears them through its own Spotify app, so no Spotify login is needed or used. CAPTCHA and unknown provider steps remain manual in the private Chromium profile. Gate automation remains subject to the provider's terms.
- 🔗 Link-Hub Expansion: A purchase link that turns out to be a list of shops rather than a download—an ampsuite release page, a gate running in smart-link mode—is opened, and the Bandcamp and Beatport links behind it are added to the track directly instead of a
gatebadge. - 🛒 Store Purchase Assistance: An optional, user-triggered flow verifies Bandcamp additions and prepares Beatport tracks as an importable playlist. Login, playlist transfer, and checkout stay manual.
- 🆕 New Since Last Refresh: Refreshing a playlist marks whatever it gained with
NEWand sorts it to the top. - 📄 Saved-HTML Fallback: Fully supports saved HTML pages (
Ctrl+S) for private or unlisted SoundCloud playlists. - ⚙️ CLI & Non-Interactive Mode: Export playlists directly to JSON or CSV for automated pipelines and scripts.
📦 Installation
Recommended (via uv or pipx)
# Install with audio preview; store-cart support is included
uv tool install 'dj-soundcloud-digger[play]'
or with pipx:
pipx install 'dj-soundcloud-digger[play]'
From Source (Development)
git clone https://github.com/fbialogrecki/dj-soundcloud-digger.git
cd dj-soundcloud-digger
uv venv
uv pip install -e '.[play,dev]'
Run the working tree without installing or releasing anything:
uv run --extra play dj-digger
The browser is drawn on standard error, so 2>file would redirect the interface
itself and leave you looking at a blank terminal. To keep a log while it is up,
use --log-file:
uv run --extra play dj-digger --log-level DEBUG --log-file /tmp/dj-digger.log
To try it against a throwaway library instead of your real playlists, point the XDG directories somewhere temporary for that one run:
XDG_DATA_HOME=/tmp/dj-dev XDG_CONFIG_HOME=/tmp/dj-dev XDG_CACHE_HOME=/tmp/dj-dev uv run --extra play dj-digger
Requires Python 3.12 or newer.
Note on optional extras:
play: Enables in-memory audio preview viaminiaudio. Store-cart support is included. On the firstcorC, the app asks before downloading its matching Chromium build automatically.
🔗 Supported Input Links
| Input Type | Supported URL Pattern | What You Get |
|---|---|---|
| Playlist / Set | soundcloud.com/user/sets/playlist-name |
Every track in the playlist |
| User Likes | soundcloud.com/user/likes |
Every track liked by the user |
| Artist Profile | soundcloud.com/user |
All tracks uploaded by the artist |
| Single Track | soundcloud.com/user/track-name |
Single track metadata & purchase links |
| Saved HTML | playlist.html |
Private / unlisted playlist saved locally |
| Interactive Prompt | Run without arguments | Prompts for a link or opens saved playlists |
🖥️ Interactive TUI Workflow
Launching dj-digger opens an interactive Textual browser divided into three key areas:
- Playlist Sidebar (
Ctrl+B): Switch between saved playlists, add new links (a), or refresh existing playlists (r). - Track Table: Displays tracks with status badges (
·untouched,○opened,✓got,✗skipped), position, artist/title, available store badges, genre, and duration. - Player & Waveform Bar: A four-row, 32-level waveform with a real-time VU level meter, over a one-row control strip: previous / play-pause / next buttons, track title, clock, a drag-to-set volume slider, and a close button.
▸ 0 all 1 soundcloud·18 2 bandcamp·12 3 gate·53 83/83 tracks · got 0 · skipped 4
Keybinding Reference
Press ? inside the TUI at any time to view the full grouped keybinding modal.
Track Navigation & Status Marks
| Key | Action |
|---|---|
Up / Down |
Navigate track rows |
o or Enter |
Open the best link (or active store filter) in your default web browser |
d |
Download the highlighted artist-provided or gate file to your download folder (set it with s) |
Shift+d |
Download all eligible tracks in the current view |
Ctrl+X |
Stop the running dig or download batch; finished files are kept, unfinished tracks stay new |
g |
Mark track as Got (✓) and move to next track |
k |
Mark track as Skipped (✗) and move to next track |
u |
Clear track status mark (·) |
x |
Remove track from current playlist (Ctrl+Z to undo) |
y |
Copy the path of the local file that matches this track (▣ in the first column) |
b / Shift+b |
Search in Bandcamp / Search in Beatport for the highlighted track |
Audio Preview Controls
| Key | Action |
|---|---|
Space |
Play / Pause highlighted track |
[ / ] |
Seek backward / forward 10 seconds |
n / p |
Advance to Next / Previous track |
- / = |
Decrease / Increase playback volume (m to mute/unmute) |
Ctrl+W |
Stop playback and close the player bar |
| Mouse Click | Click anywhere on the waveform display to seek immediately, or use the buttons and volume slider under it |
Filtering, Stores & Library
| Key | Action |
|---|---|
/ |
Live search/filter by artist, title, genre, tag or label (every word must match, any order) |
t / Shift+t |
Sort by title, time, genre, status or store (t cycles, Shift+t reverses); the header shows the arrow |
v / Shift+v / Ctrl+A |
Select a row / extend the selection to here / select everything shown; batch keys then act on the selection |
1 – 9 |
Jump directly to store category filter |
0 |
Reset store filter (show all tracks) |
h |
Toggle hiding handled tracks (got / skipped) |
Escape |
Clear the selection; then the search; then the store filter and hiding |
Shift+o |
Open all visible store links in browser (asks confirmation for >20 links) |
c |
Add the highlighted track to Bandcamp, or prepare it for a Beatport playlist |
Shift+c |
Review visible store tracks, add Bandcamp items, and prepare a Beatport playlist |
Shift+p |
Open every exact Beatport track page shown in your regular browser, to add to cart by hand (asks above 20) |
e |
Export visible rows to file |
a |
Add a new playlist from a SoundCloud URL |
r |
Refresh current playlist from SoundCloud (preserves local deletions) |
Shift+x |
Delete the highlighted playlist, after confirming |
Shift+u |
Reset every track in the playlist to untouched |
Ctrl+B |
Toggle Playlist Sidebar |
s |
Settings: profile, folders, browser, store session |
? |
Full keybinding help |
q / Ctrl+C |
Quit |
🏷️ Store & Gate Categories
Links are parsed and categorized using strict domain-boundary matching:
| Category | Description / Included Domains |
|---|---|
soundcloud |
Direct artist-provided download link enabled on SoundCloud |
bandcamp |
Official Bandcamp release page |
beatport |
Beatport purchase link |
traxsource |
Traxsource store link |
junodownload |
JunoDownload purchase page |
apple |
Apple Music / iTunes Store link |
shop |
Specialized record stores (Boomkat, Hard Wax, Clone, Decks, Deejay, Red Eye, Juno, Phonica, Rush Hour, Bleep, Gumroad) |
gate |
Follow-to-download gates (Hypeddit, Gaterush, Droploud, Wump, Artist Union, Toneden, Pump Your Sound) |
smartlink |
Landing pages (lnk.to, ffm.to, fanlink, smarturl, orcd.co, DistroKid, Linktree) |
streaming |
Pure streaming platforms (Spotify, YouTube, Deezer, Tidal) |
no-link |
No purchase or download link found |
others |
Unrecognized external web link |
Bandcamp carts and Beatport playlists
Pressing c or C does the product checks and the cart clicks in a hidden
Chromium; nothing pops up while it works. A window appears only when there is
something for you: the completed Bandcamp cart, or items left to finish by
hand. That window is a separate browser carrying the same cookies, so the
hidden session is never disturbed. A desktop display is needed for those
moments only (WSL users need WSLg); without one the additions still stand and
the result screen says the window could not be shown. If the matching browser
build is absent, the app asks before downloading it in the background and then
resumes the cart preflight. The app uses a dedicated persistent browser profile,
separate from your everyday browser. A Bandcamp account is not required for its
cookie-backed cart; opening a manual Bandcamp session in Settings is optional.
Beatport login is never attempted there. The app never reads or fills your
password, chooses a payment method, or completes checkout.
cresolves the highlighted track, then adds it to Bandcamp or prepares it for a Beatport playlist.Cresolves all currently visible, unhandled tracks, then asks for one batch confirmation. The active Bandcamp or Beatport filter limits the target store.- When both Bandcamp and Beatport filters are explicitly active, each track is handled for both destinations: Bandcamp is added to its cart and Beatport is retained for the transfer playlist.
- With no store filter, Bandcamp is tried first. Beatport is used only when the exact track is genuinely unavailable for individual purchase on Bandcamp—not when Bandcamp fails technically.
Batch mode resolves every candidate first and shows exact products, prices,
currencies, existing cart items, and skips before Bandcamp is changed. Bandcamp
rows with seller-approved flexible pricing show their minimum; highlight one and
press E to enter a higher value. Fixed-price rows cannot be edited. Bandcamp
pages are rechecked immediately before each click. Ambiguous titles, version
mismatches, changed prices or product IDs, CAPTCHA, and changed store UI stop the
affected Bandcamp operation instead of guessing. Two reusable work tabs bound
preflight; Bandcamp mutation is serial, and only its successful final cart tab
remains open for format selection and checkout.
If a Bandcamp link moved or points only to an artist/label page, the app uses the
site's visible autocomplete as a bounded fallback. It accepts only canonical,
exact track matches and inspects at most three returned album pages; it never
enters the CAPTCHA-protected full results page. A track sold only as part of a
full album is reported as album-only instead of silently adding the whole album.
After a click, verification uses the cart count, a visible removable row in the
opened side cart, and one reload check, each on its own clock. An uncertain
cart remains open for inspection and is never clicked again automatically; the
app saves a screenshot and a redacted copy of the page under
cart-diagnostics in its data folder (last ten kept) so a broken flow can be
reported with the page that broke it. After two unverified clicks in one
batch the app stops clicking: it opens the remaining products with Buy
expanded and the price filled, asks you to press Add to cart yourself, and
then checks the cart once. The result screen offers the same Finish in
browser for anything left uncertain.
Beatport login and cart mutation are not automated: c/Shift+C prepare a
playlist, and Shift+P opens the exact Beatport track pages in your everyday
browser, where you are already logged in, so adding to the cart is one click
each. The result screen creates a
new Beatport playlist.txt in the playlist's download folder, copies its contents,
creates a temporary Soundiiz import with Beatport already selected, and opens
the returned review page. Confirm the matches and finish the transfer there;
Soundiiz accepts up to 200 tracks per import. The saved file and clipboard remain
available as a fallback. Promo prefixes, uploader names, preview markers and
trailing label fields are removed before matching, including titles whose artist
separator has no surrounding spaces. Exact Beatport track URLs are preferred in that
file and replace stored release links so later imports can reuse them. Release links and blocked public pages
are looked up for the exact title/remix and fall back to cleaned artist - title, which
Soundiiz presents for review before writing the Beatport playlist. Already-exact
numeric track URLs bypass Chromium. Old pro.beatport.com links are automatically
rewritten and saved under www.beatport.com. In Beatport DJ, that playlist can then be
added to the default cart in one action.
Only canonical Bandcamp and Beatport HTTPS domains are inspected. Custom artist domains remain outside this version. The feature depends on the stores' and Soundiiz's public import interface; use it in line with their terms. Showing the completed Bandcamp cart or opening its manual session needs a graphical session; WSL users need WSLg or another working display.
For a timestamped diagnostic log that does not interfere with Textual, run:
uv run --extra play dj-digger --log-level DEBUG --log-file /tmp/dj-digger-cart.log
🔐 Authentication for Artist Downloads
Some artist-provided SoundCloud downloads require a logged-in account even when
the track is public. Run dj-digger auth login: an existing valid login or a
readable Firefox session is used first, otherwise dj-digger opens a dedicated
Playwright Chromium profile and waits up to five minutes for you to log in. Only
the verified oauth_token cookie is copied to dj-digger; passwords and other
cookies are not written to its credential file. If Chromium cannot start, the
command offers a hidden token-paste fallback:
dj-digger auth login
dj-digger auth login --token YOUR_SOUNDCLOUD_OAUTH_TOKEN
dj-digger auth status
dj-digger auth logout
The TUI opens the same choice automatically when a download needs SoundCloud. Cancelling leaves the track untouched. A successful login recreates the API client after active downloads finish and retries the waiting track once.
SoundCloud's private browser profile lives in
~/.local/share/dj-digger/soundcloud-browser; its verified API credential lives
in the owner-only ~/.config/dj-digger/auth.json (the standard XDG environment
variables override both base directories).
If SOUNDCLOUD_OAUTH_TOKEN is set, it deliberately overrides that file; an
invalid value must be unset or updated before the CLI wizard can replace a login.
When Hypeddit or GateRush requires an email address, the TUI asks for a real name and email before it submits the gate. It explains who receives those data, rejects placeholders and malformed addresses, and retries only the downloads that were waiting for the profile. Cancelling sends no retry request.
Spotify steps on download gates
Hypeddit gates that show a Spotify step are handled like the other click-through
steps: the gate clears that step through Hypeddit's own Spotify app and server
session, so nothing dj-digger could do with your Spotify account would reach it.
Releases before 1.0 asked for a Spotify developer app and stored a login in
~/.config/dj-digger/spotify.json; that file is no longer read, and you can
delete it yourself.
When a gate ends up in the private Chromium profile (a refusal, a CAPTCHA, a provider login), a hidden browser walks the gate's own step slides for you: it ticks the follow and like links (closing the provider pages they open, unread), presses the Connect of a Spotify step - whose login popup comes back by itself once you have signed in to Spotify in that profile - fills the email slide with the address from Settings (and the name, when the gate asks for one), and presses Download. Only a step no program can do alone - a provider asking you to sign in, a CAPTCHA, a missing email or name - opens a window, where the same driver keeps walking the steps before and after the one that needs you. Sign in to Spotify there once and later gates finish out of sight. Nothing outside the Hypeddit page is clicked. Disable gate social actions in Settings to keep the program from reporting or clicking any social step at all. Gates requiring those actions will then remain manual.
🎧 In-Memory Streaming & Waveform Engine
- Zero-Latency Playback: Decodes audio chunks directly off the network socket in memory via
miniaudio. - Pre-Fetching & Gapless Transitions: While listening to a track, the next track's stream URL, waveform data, and initial MBs are buffered 20 seconds prior to track completion.
- SoundCloud Waveform Rendering: Renders SoundCloud's 1800-sample waveform data into a 4-row block ASCII visualizer with logarithmic loudness scaling.
- Reactive Audio VU Metering: Real-time RMS audio signal measurement rendered at 30 FPS.
- Remote SSH / Headless Systems: Automatically degrades to 4 FPS under
TEXTUAL_ANIMATIONS=nonefor smooth operation over SSH connections.
🤖 Non-Interactive CLI & Automation
Add --no-tui to run dj-digger in batch mode for terminal pipelines, cron jobs, or export scripts:
# Export playlist links to CSV
dj-digger https://soundcloud.com/user/sets/playlist --no-tui -f csv -o playlist.csv
# Limit extraction to first 20 tracks and export to JSON
dj-digger https://soundcloud.com/user/likes -n 20 -f json -o likes.json
# Re-open a previously exported JSON playlist in the TUI browser
dj-digger open likes.json
# Open all Bandcamp links directly in browser from a saved playlist
dj-digger open likes.json --category bandcamp
🏗️ Project Architecture
┌─────────────────────────┐
│ SoundCloud URL / HTML │
└────────────┬────────────┘
│
┌──────────▼──────────┐
│ SoundCloudClient v2 │
│ (Resolve & Hydrate) │
└──────────┬──────────┘
│
┌──────────▼──────────┐
│ Link Categorizer │
│ (Store & Gate Engine│
└──────────┬──────────┘
│
┌────────────────────────┼────────────────────────┐
│ │ │
┌──────────▼──────────┐ ┌──────────▼──────────┐ ┌──────────▼──────────┐
│ Textual TUI App │ │ Playlist Library │ │ In-Memory Player │
│ (Interactive Grid) │ │ (~/.../crates/) │ │ (Miniaudio & VU) │
└─────────────────────┘ └────────────────────┘ └────────────────────┘
🧪 Testing & Quality Assurance
The codebase includes an extensive offline test suite covering unit tests, API serialization, player buffering, link parsing, cart safety, and TUI reactive widgets.
# Run offline test suite (550+ tests, no network required)
uv run pytest
# Run live integration tests (verifies SoundCloud API v2 contract stability)
uv run pytest -m live
# Open public store pages read-only; never logs in or changes a cart
uv run pytest -m shop_live
📄 License
Distributed under the Apache License 2.0. See LICENSE for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dj_soundcloud_digger-1.0.0.tar.gz.
File metadata
- Download URL: dj_soundcloud_digger-1.0.0.tar.gz
- Upload date:
- Size: 542.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76321bfb3113202e8d4619287c87b379378cd9717f02101570a7aac3000020f4
|
|
| MD5 |
7ffec861b2510ae09f3be03e8e9aa37f
|
|
| BLAKE2b-256 |
9fbefc161d896f7f42cc7171e64f8d7539b01f98234d40c5cc721a775a846e48
|
Provenance
The following attestation bundles were made for dj_soundcloud_digger-1.0.0.tar.gz:
Publisher:
publish.yml on fbialogrecki/dj-soundcloud-digger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_soundcloud_digger-1.0.0.tar.gz -
Subject digest:
76321bfb3113202e8d4619287c87b379378cd9717f02101570a7aac3000020f4 - Sigstore transparency entry: 2714339716
- Sigstore integration time:
-
Permalink:
fbialogrecki/dj-soundcloud-digger@171f03365dda03d4a5e5e9e5efff57d041b5c1c7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fbialogrecki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@171f03365dda03d4a5e5e9e5efff57d041b5c1c7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file dj_soundcloud_digger-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dj_soundcloud_digger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 206.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9792c26a0d7d208b3e35f9e3a1315fd7b91b2e750e19ccdfef17f50be43dd099
|
|
| MD5 |
c4584251a72f684acf2abbe7ed186cbb
|
|
| BLAKE2b-256 |
43b23a2f1a220267940949bce3a998cccab609238c84734e32fded310233ef3e
|
Provenance
The following attestation bundles were made for dj_soundcloud_digger-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on fbialogrecki/dj-soundcloud-digger
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_soundcloud_digger-1.0.0-py3-none-any.whl -
Subject digest:
9792c26a0d7d208b3e35f9e3a1315fd7b91b2e750e19ccdfef17f50be43dd099 - Sigstore transparency entry: 2714340052
- Sigstore integration time:
-
Permalink:
fbialogrecki/dj-soundcloud-digger@171f03365dda03d4a5e5e9e5efff57d041b5c1c7 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/fbialogrecki
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@171f03365dda03d4a5e5e9e5efff57d041b5c1c7 -
Trigger Event:
release
-
Statement type: