Download albums from your Bandcamp library
Project description
campground
A lightweight command-line tool for downloading albums from your Bandcamp library.
Requirements
- Python 3.11+
- A Bandcamp account with purchased items
Installation
pip install git+https://github.com/oxfordbags/campground.git
Setup
Campground authenticates using your browser session cookies. You only need to do this once (or when your session expires).
- Log in to bandcamp.com in your browser
- Open Dev Tools (
Cmd+Option+Ion Mac,F12on Windows) - Go to the Network tab and refresh the page
- Click any
bandcamp.comrequest and find the Cookie: request header - Copy the full value
Then add it to ~/.config/campground/config.toml:
[bandcamp]
cookies = "your_cookie_string_here"
[download]
format = "flac" # optional, default: flac
output_dir = "~/Music" # optional, default: current directory
Or pass cookies directly on the command line:
campground <url> --cookies "your_cookie_string_here"
Usage
campground <bandcamp-album-url> [options]
Examples:
# Download an album in the default format (flac)
campground https://artist.bandcamp.com/album/album-title
# Choose a format
campground https://artist.bandcamp.com/album/album-title --format mp3-320
# Download to a specific directory
campground https://artist.bandcamp.com/album/album-title --output ~/Music/Bandcamp
# Re-download and replace an existing copy
campground https://artist.bandcamp.com/album/album-title --overwrite
Options
| Flag | Description |
|---|---|
-f, --format |
Audio format (see below). Default: flac |
-o, --output |
Output directory. Default: current directory |
--cookies |
Cookie string from browser dev tools |
--cookies-file |
Path to a file containing the cookie string |
--overwrite |
Replace an existing download in the output directory |
Supported formats: mp3-v0, mp3-320, flac, aac-hi, vorbis, alac, wav, aiff-lossless
How it works
Campground uses your session cookies to access the Bandcamp collection API, locates the requested album, fetches a signed download link for your chosen format, and streams the file to a temporary directory before extracting and moving it to the output directory. If anything goes wrong the temporary files are cleaned up automatically.
Project 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 campground-0.1.0.tar.gz.
File metadata
- Download URL: campground-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9849821b91f5d8651c0fe6eb22cea641d1dc43cba8aa58b0a13b66204a03b97b
|
|
| MD5 |
b73b06c5d1f1614270bfc8cf74b68a46
|
|
| BLAKE2b-256 |
c26d63468758c7e6cbfb27f4fc854d9988688fc5c4e820314fbedac12afebc73
|
Provenance
The following attestation bundles were made for campground-0.1.0.tar.gz:
Publisher:
publish.yml on oxfordbags/campground
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
campground-0.1.0.tar.gz -
Subject digest:
9849821b91f5d8651c0fe6eb22cea641d1dc43cba8aa58b0a13b66204a03b97b - Sigstore transparency entry: 1551292973
- Sigstore integration time:
-
Permalink:
oxfordbags/campground@3ae300d0e52054e59cff02dc0545965dd785b5b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/oxfordbags
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ae300d0e52054e59cff02dc0545965dd785b5b1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file campground-0.1.0-py3-none-any.whl.
File metadata
- Download URL: campground-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a7e703a08e55216930c82332154e8cd7ae06d85190cd15ea8700eb8d38501c5
|
|
| MD5 |
2db05a111eec10d6c40e7e668a77825c
|
|
| BLAKE2b-256 |
09f8ca8ee5d9658d71b0fdf7e872e69b1d5e5709c8369971aac5412bf2fd1135
|
Provenance
The following attestation bundles were made for campground-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on oxfordbags/campground
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
campground-0.1.0-py3-none-any.whl -
Subject digest:
6a7e703a08e55216930c82332154e8cd7ae06d85190cd15ea8700eb8d38501c5 - Sigstore transparency entry: 1551293022
- Sigstore integration time:
-
Permalink:
oxfordbags/campground@3ae300d0e52054e59cff02dc0545965dd785b5b1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/oxfordbags
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3ae300d0e52054e59cff02dc0545965dd785b5b1 -
Trigger Event:
push
-
Statement type: