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.1.tar.gz (8.8 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.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: campground-0.1.1.tar.gz
  • Upload date:
  • Size: 8.8 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.1.tar.gz
Algorithm Hash digest
SHA256 1ed6a98f77b876825806ecc5c0a0bf850223768144b9d5aee2f5229f1c5408b9
MD5 57c2afd97657a413a940f4757e559bd8
BLAKE2b-256 93a433a8a21f67d986569ce75bbc41596695a7397de428af617fc7f6d1d081dc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: campground-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8790d2fdb661d3a3871b32d52674e85f468b54a2adb0a021ef33242f81ff4423
MD5 055b47d213586ddc3c48ec259f81f3c4
BLAKE2b-256 87300caf6d9fb4adddb833d398ab2a6930f368dc18779695d5ec1405bceb2626

See more details on using hashes here.

Provenance

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