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.3.tar.gz (12.4 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.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file campground-0.1.3.tar.gz.

File metadata

  • Download URL: campground-0.1.3.tar.gz
  • Upload date:
  • Size: 12.4 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.3.tar.gz
Algorithm Hash digest
SHA256 46fc0c208d2b4c3d8eea036d1d791e77c74a364e091926e3132f8c19ba2b2ef2
MD5 a27a33f67dd09225a7c23c12e16189fa
BLAKE2b-256 72e3669dfc6340b8443a20457b9855ffafb504d50dcd8ec52f0843bcbba626f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for campground-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: campground-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a2bd76d37f7874e3a144670e1708e2030e74111ae6299959c7f049cc5ed3e08
MD5 3bc4fe291e403a76c1ba885ffa13a710
BLAKE2b-256 1db874f4f542c62206c33e2e5cc0861499bfad93c24a892408c8a6d43e073780

See more details on using hashes here.

Provenance

The following attestation bundles were made for campground-0.1.3-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