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.2.tar.gz (12.1 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.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: campground-0.1.2.tar.gz
  • Upload date:
  • Size: 12.1 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.2.tar.gz
Algorithm Hash digest
SHA256 0bd983a7e69a67980421f7177bd89a8711ec0ee4f492767524d6bbea01bf6541
MD5 01d8ac15f015e9836d4f5f0b31d809cf
BLAKE2b-256 7cb3a145d44068e3d86054dff622b570f6f78ec13bdd05dae83320cbdc5b6e33

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: campground-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef2a86e3df24ce19f99efc6f53658524fcf9ac60c92cacbf168b6ba0fd4faf7
MD5 f1815ebbdeae46bacffa6b16570e87a0
BLAKE2b-256 95fb3027f0481692ba460c4776118ef7295b89f4d0474b2651bc200e5c69d108

See more details on using hashes here.

Provenance

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