Skip to main content

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).

  1. Log in to bandcamp.com in your browser
  2. Open Dev Tools (Cmd+Option+I on Mac, F12 on Windows)
  3. Go to the Network tab and refresh the page
  4. Click any bandcamp.com request and find the Cookie: request header
  5. 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

campground-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

campground-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for campground-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9849821b91f5d8651c0fe6eb22cea641d1dc43cba8aa58b0a13b66204a03b97b
MD5 b73b06c5d1f1614270bfc8cf74b68a46
BLAKE2b-256 c26d63468758c7e6cbfb27f4fc854d9988688fc5c4e820314fbedac12afebc73

See more details on using hashes here.

Provenance

The following attestation bundles were made for campground-0.1.0.tar.gz:

Publisher: publish.yml on oxfordbags/campground

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for campground-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a7e703a08e55216930c82332154e8cd7ae06d85190cd15ea8700eb8d38501c5
MD5 2db05a111eec10d6c40e7e668a77825c
BLAKE2b-256 09f8ca8ee5d9658d71b0fdf7e872e69b1d5e5709c8369971aac5412bf2fd1135

See more details on using hashes here.

Provenance

The following attestation bundles were made for campground-0.1.0-py3-none-any.whl:

Publisher: publish.yml on oxfordbags/campground

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page