```
▄▀▀█▄▄ ▄▀▀█▄ ▄▀▀▄ ▀▄ ▄▀▀█▄▄ ▄▀▄▄▄▄ ▄▀▀█▄ ▄▀▀▄ ▄▀▄ ▄▀▀▄▀▀▀▄ ▄▀▀█▄▄▄▄ ▄▀▀▄▀▀▀▄
▐ ▄▀ █ ▐ ▄▀ ▀▄ █ █ █ █ █ ▄▀ █ █ █ ▌ ▐ ▄▀ ▀▄ █ █ ▀ █ █ █ █ ▐ ▄▀ ▐ █ █ █
█▄▄▄▀ █▄▄▄█ ▐ █ ▀█ ▐ █ █ ▐ █ █▄▄▄█ ▐ █ █ ▐ █▀▀▀▀ █▄▄▄▄▄ ▐ █▀▀█▀
█ █ ▄▀ █ █ █ █ █ █ ▄▀ █ █ █ █ █ ▌ ▄▀ █
▄▀▄▄▄▀ █ ▄▀ ▄▀ █ ▄▀▄▄▄▄▀ ▄▀▄▄▄▄▀ █ ▄▀ ▄▀ ▄▀ ▄▀ ▄▀▄▄▄▄ █ █
█ ▐ ▐ ▐ █ ▐ █ ▐ █ ▐ ▐ ▐ █ █ █ █ ▐ ▐ ▐
▐ ▐ ▐ ▐ ▐ ▐ ▐ ▐
```
# bandcamper
The most powerful Bandcamp downloader there is! If you can play a song on Bandcamp, bandcamper can download it for free ;).
## Description
bandcamper is a Python-powered tool that tries its best to download albums and tracks from Bandcamp for free! It does that by trying these 3 methods:
1. If an item has a "free download" option ([example](https://concretomorto.bandcamp.com/album/medo-da-astrologia)), amazing! bandcamper will be able to download it in **any format** you'd like.
2. If an item has an "email download" option ([example](https://stippling.bandcamp.com/album/stippling)), amazing! bandcamper will use [onesecmail](https://github.com/yyyyyyyan/onesecmail) to get a temporary email address and will be able to download the item in **any format** you'd like.
3. If an item is playable via Bandcamp ([example](https://eltorofuerte.bandcamp.com/album/nossos-amigos-e-os-lugares-que-visitamos)), good! bandcamper will be able to download it in **mp3-128 format**.
### Does Bandcamp allow this?
You can read Bandcamp's position [here (*I heard you can steal music on Bandcamp. What are you doing about this?*)](https://get.bandcamp.help/hc/en-us/articles/360007902173-I-heard-you-can-steal-music-on-Bandcamp-What-are-you-doing-about-this-).
## Installation
Use [pipx](https://github.com/pypa/pipx) or [pip](https://pip.pypa.io/en/stable/) to install **bandcamper**:
```bash
pipx install bandcamper
```
## Usage
Call `bandcamper` through the command line:
```
Usage: bandcamper [OPTIONS] URL [URL...]
Options:
Input Options:
-i, --input FILE Download from URLs/artists subdomains listed
on file. This option can be used multiple
times
Audio Options:
-f, --format [aac-hi|aiff-lossless|alac|flac|mp3-128|mp3-320|mp3-v0|vorbis|wav]
Preferred audio formats to download. This
option can be used multiple times. Defaults
to mp3-320.
--fallback / --no-fallback Download fallback mp3-128 audio file in case
there are no other free downloads available
Download Options:
-d, --destination DIRECTORY Base destination folder for downloaded
files. Defaults to current folder
-o, --output TEMPLATE Output filename template. See the 'Output
Template' section of the README for all the
info
--output-extra TEMPLATE Output filename template for extra files.
See the 'Extra Output Template' section of
the README for all the info
Request Options:
--random-user-agent Use random User-Agent for Bandcamp requests
--http-proxy URL Proxy to use for HTTP connections
--https-proxy URL Proxy to use for HTTPS connections
--proxy URL Proxy to use for all connections. This
option overrides --http-proxy and --https-
proxy
--force-https / --no-force-https
Rewrite every URL to use HTTPS [default:
force-https]
Output Options:
-v, --verbose Run bandcamper with more verbose output
-q, --quiet Completely disable output
--colored / --no-colors Use colored output [default: colored]
--config FILE Read option defaults from the specified JSON
config file. Defaults to
bandcamper_config.json
-V, --version Show the version and exit.
-h, --help Show this message and exit.
```
### Output Template
The output template is a string that can contain special variables and will be joined to the destination directory to determine the final path of the downloaded tracks.
This template follows the Python string formatting scheme of `{var}` and is, by default, `"{artist}/{album}/{track_num:02d} - {track}.{ext}"`. You can change the template through the -o/--output flag.
These are the available variables you can use in the template:
| Variable | Description |
|-----------|----------------------------|
| album | The album's title |
| artist | The artist's name |
| ext | The track's file extension |
| track | The track's title |
| track_num | The track number |
| year | The album's release year |
### Extra Output Template
Some Bandcamp downloads come with extra files other than the tracks, like the cover art image. These files will not follow the output template, since they are not tracks.
Instead, they follow the extra output template, which can be passed through the --output-extra parameter and by default is `"{artist}/{album}/{filename}"`.
These are the available variables you can use in the template:
| Variable | Description |
|-----------|----------------------------|
| album | The album's title |
| artist | The artist's name |
| filename | The name of the file |
| year | The album's release year |
### Examples
#### Download all releases from the band [stippling](https://stippling.bandcamp.com/):
```
bandcamper stippling
```
#### Download album [stippling - Perfect Life](https://stippling.bandcamp.com/album/perfect-life) in flac format:
```
bandcamper -f flac "https://stippling.bandcamp.com/album/perfect-life"
```
Results:
```
stippling
└── Perfect Life
├── 01 - My Friend Dead.flac
├── 02 - Oh My God.flac
├── 03 - Sunshine Kids.flac
├── 04 - Brights.flac
├── 05 - Monologue.flac
├── 06 - 2am.flac
├── 07 - Inner Dark.flac
├── 08 - Think of You.flac
├── 09 - Scared of Changing.flac
├── 10 - Ready Set Rock.flac
├── 11 - The Journal.flac
├── 12 - Letters to Ghosts.flac
├── 13 - Fake Smile.flac
├── 14 - Perfect Life.flac
└── cover.jpg
```
#### Download album [stippling - Perfect Life](https://stippling.bandcamp.com/album/perfect-life) in flac and mp3-320 formats with custom output template:
```
bandcamper -f flac -f mp3-320 -o "{artist}/{album} ({year})/{ext}/{track_num:02d} - {track}.{ext}" --output-extra "{artist}/{album} ({year})/{filename}" "https://stippling.bandcamp.com/album/perfect-life"
```
Results:
```
stippling
└── Perfect Life (2018)
├── cover.jpg
├── flac
│ ├── 01 - My Friend Dead.flac
│ ├── 02 - Oh My God.flac
│ ├── 03 - Sunshine Kids.flac
│ ├── 04 - Brights.flac
│ ├── 05 - Monologue.flac
│ ├── 06 - 2am.flac
│ ├── 07 - Inner Dark.flac
│ ├── 08 - Think of You.flac
│ ├── 09 - Scared of Changing.flac
│ ├── 10 - Ready Set Rock.flac
│ ├── 11 - The Journal.flac
│ ├── 12 - Letters to Ghosts.flac
│ ├── 13 - Fake Smile.flac
│ └── 14 - Perfect Life.flac
└── mp3
├── 01 - My Friend Dead.mp3
├── 02 - Oh My God.mp3
├── 03 - Sunshine Kids.mp3
├── 04 - Brights.mp3
├── 05 - Monologue.mp3
├── 06 - 2am.mp3
├── 07 - Inner Dark.mp3
├── 08 - Think of You.mp3
├── 09 - Scared of Changing.mp3
├── 10 - Ready Set Rock.mp3
├── 11 - The Journal.mp3
├── 12 - Letters to Ghosts.mp3
├── 13 - Fake Smile.mp3
└── 14 - Perfect Life.mp3
```
## Contributing
Pull requests are welcome! We just released the alpha so right now our top priorities are **refactoring** and **testing**, but any contribution might be a good contribution :-). I also plan on replacing requests with httpx soon.
In order to start contributing with bandcamper's code, make sure you install the pre-commit hooks listed in the [.pre-commit-config.yaml](https://github.com/yyyyyyyan/bandcamper/blob/main/.pre-commit-config.yaml) file with the following commands:
```bash
pip install -r requirements_dev.txt
pre-commit install
```
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/yyyyyyyan/bandcamper/blob/main/LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/yyyyyyyan/bandcamper",
"name": "bandcamper",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "bandcamp,downloader,music",
"author": "yyyyyyyan",
"author_email": "contact@yyyyyyyan.tech",
"download_url": "https://files.pythonhosted.org/packages/40/a1/bf805182058a9717954b043d47f83cdbd48eb0b2b60bd9df83e2b4180482/bandcamper-0.0.2.tar.gz",
"platform": null,
"description": "```\n \u2584\u2580\u2580\u2588\u2584\u2584 \u2584\u2580\u2580\u2588\u2584 \u2584\u2580\u2580\u2584 \u2580\u2584 \u2584\u2580\u2580\u2588\u2584\u2584 \u2584\u2580\u2584\u2584\u2584\u2584 \u2584\u2580\u2580\u2588\u2584 \u2584\u2580\u2580\u2584 \u2584\u2580\u2584 \u2584\u2580\u2580\u2584\u2580\u2580\u2580\u2584 \u2584\u2580\u2580\u2588\u2584\u2584\u2584\u2584 \u2584\u2580\u2580\u2584\u2580\u2580\u2580\u2584\n \u2590 \u2584\u2580 \u2588 \u2590 \u2584\u2580 \u2580\u2584 \u2588 \u2588 \u2588 \u2588 \u2588 \u2584\u2580 \u2588 \u2588 \u2588 \u258c \u2590 \u2584\u2580 \u2580\u2584 \u2588 \u2588 \u2580 \u2588 \u2588 \u2588 \u2588 \u2590 \u2584\u2580 \u2590 \u2588 \u2588 \u2588\n \u2588\u2584\u2584\u2584\u2580 \u2588\u2584\u2584\u2584\u2588 \u2590 \u2588 \u2580\u2588 \u2590 \u2588 \u2588 \u2590 \u2588 \u2588\u2584\u2584\u2584\u2588 \u2590 \u2588 \u2588 \u2590 \u2588\u2580\u2580\u2580\u2580 \u2588\u2584\u2584\u2584\u2584\u2584 \u2590 \u2588\u2580\u2580\u2588\u2580\n \u2588 \u2588 \u2584\u2580 \u2588 \u2588 \u2588 \u2588 \u2588 \u2588 \u2584\u2580 \u2588 \u2588 \u2588 \u2588 \u2588 \u258c \u2584\u2580 \u2588\n \u2584\u2580\u2584\u2584\u2584\u2580 \u2588 \u2584\u2580 \u2584\u2580 \u2588 \u2584\u2580\u2584\u2584\u2584\u2584\u2580 \u2584\u2580\u2584\u2584\u2584\u2584\u2580 \u2588 \u2584\u2580 \u2584\u2580 \u2584\u2580 \u2584\u2580 \u2584\u2580\u2584\u2584\u2584\u2584 \u2588 \u2588\n \u2588 \u2590 \u2590 \u2590 \u2588 \u2590 \u2588 \u2590 \u2588 \u2590 \u2590 \u2590 \u2588 \u2588 \u2588 \u2588 \u2590 \u2590 \u2590\n \u2590 \u2590 \u2590 \u2590 \u2590 \u2590 \u2590 \u2590\n```\n\n# bandcamper\nThe most powerful Bandcamp downloader there is! If you can play a song on Bandcamp, bandcamper can download it for free ;).\n\n## Description\n\nbandcamper is a Python-powered tool that tries its best to download albums and tracks from Bandcamp for free! It does that by trying these 3 methods:\n\n1. If an item has a \"free download\" option ([example](https://concretomorto.bandcamp.com/album/medo-da-astrologia)), amazing! bandcamper will be able to download it in **any format** you'd like.\n2. If an item has an \"email download\" option ([example](https://stippling.bandcamp.com/album/stippling)), amazing! bandcamper will use [onesecmail](https://github.com/yyyyyyyan/onesecmail) to get a temporary email address and will be able to download the item in **any format** you'd like.\n3. If an item is playable via Bandcamp ([example](https://eltorofuerte.bandcamp.com/album/nossos-amigos-e-os-lugares-que-visitamos)), good! bandcamper will be able to download it in **mp3-128 format**.\n\n### Does Bandcamp allow this?\n\nYou can read Bandcamp's position [here (*I heard you can steal music on Bandcamp. What are you doing about this?*)](https://get.bandcamp.help/hc/en-us/articles/360007902173-I-heard-you-can-steal-music-on-Bandcamp-What-are-you-doing-about-this-).\n\n## Installation\n\nUse [pipx](https://github.com/pypa/pipx) or [pip](https://pip.pypa.io/en/stable/) to install **bandcamper**:\n```bash\npipx install bandcamper\n```\n\n## Usage\n\nCall `bandcamper` through the command line:\n\n```\nUsage: bandcamper [OPTIONS] URL [URL...]\n\nOptions:\n Input Options:\n -i, --input FILE Download from URLs/artists subdomains listed\n on file. This option can be used multiple\n times\n Audio Options:\n -f, --format [aac-hi|aiff-lossless|alac|flac|mp3-128|mp3-320|mp3-v0|vorbis|wav]\n Preferred audio formats to download. This\n option can be used multiple times. Defaults\n to mp3-320.\n --fallback / --no-fallback Download fallback mp3-128 audio file in case\n there are no other free downloads available\n Download Options:\n -d, --destination DIRECTORY Base destination folder for downloaded\n files. Defaults to current folder\n -o, --output TEMPLATE Output filename template. See the 'Output\n Template' section of the README for all the\n info\n --output-extra TEMPLATE Output filename template for extra files.\n See the 'Extra Output Template' section of\n the README for all the info\n Request Options:\n --random-user-agent Use random User-Agent for Bandcamp requests\n --http-proxy URL Proxy to use for HTTP connections\n --https-proxy URL Proxy to use for HTTPS connections\n --proxy URL Proxy to use for all connections. This\n option overrides --http-proxy and --https-\n proxy\n --force-https / --no-force-https\n Rewrite every URL to use HTTPS [default:\n force-https]\n Output Options:\n -v, --verbose Run bandcamper with more verbose output\n -q, --quiet Completely disable output\n --colored / --no-colors Use colored output [default: colored]\n --config FILE Read option defaults from the specified JSON\n config file. Defaults to\n bandcamper_config.json\n -V, --version Show the version and exit.\n -h, --help Show this message and exit.\n```\n\n### Output Template\n\nThe output template is a string that can contain special variables and will be joined to the destination directory to determine the final path of the downloaded tracks.\n\nThis template follows the Python string formatting scheme of `{var}` and is, by default, `\"{artist}/{album}/{track_num:02d} - {track}.{ext}\"`. You can change the template through the -o/--output flag.\n\nThese are the available variables you can use in the template:\n\n| Variable | Description |\n|-----------|----------------------------|\n| album | The album's title |\n| artist | The artist's name |\n| ext | The track's file extension |\n| track | The track's title |\n| track_num | The track number |\n| year | The album's release year |\n\n### Extra Output Template\n\nSome Bandcamp downloads come with extra files other than the tracks, like the cover art image. These files will not follow the output template, since they are not tracks.\n\nInstead, they follow the extra output template, which can be passed through the --output-extra parameter and by default is `\"{artist}/{album}/{filename}\"`.\n\nThese are the available variables you can use in the template:\n\n| Variable | Description |\n|-----------|----------------------------|\n| album | The album's title |\n| artist | The artist's name |\n| filename | The name of the file |\n| year | The album's release year |\n\n\n### Examples\n\n#### Download all releases from the band [stippling](https://stippling.bandcamp.com/):\n```\nbandcamper stippling\n```\n\n#### Download album [stippling - Perfect Life](https://stippling.bandcamp.com/album/perfect-life) in flac format:\n```\nbandcamper -f flac \"https://stippling.bandcamp.com/album/perfect-life\"\n```\nResults:\n```\nstippling\n\u2514\u2500\u2500 Perfect Life\n \u251c\u2500\u2500 01 - My Friend Dead.flac\n \u251c\u2500\u2500 02 - Oh My God.flac\n \u251c\u2500\u2500 03 - Sunshine Kids.flac\n \u251c\u2500\u2500 04 - Brights.flac\n \u251c\u2500\u2500 05 - Monologue.flac\n \u251c\u2500\u2500 06 - 2am.flac\n \u251c\u2500\u2500 07 - Inner Dark.flac\n \u251c\u2500\u2500 08 - Think of You.flac\n \u251c\u2500\u2500 09 - Scared of Changing.flac\n \u251c\u2500\u2500 10 - Ready Set Rock.flac\n \u251c\u2500\u2500 11 - The Journal.flac\n \u251c\u2500\u2500 12 - Letters to Ghosts.flac\n \u251c\u2500\u2500 13 - Fake Smile.flac\n \u251c\u2500\u2500 14 - Perfect Life.flac\n \u2514\u2500\u2500 cover.jpg\n```\n#### Download album [stippling - Perfect Life](https://stippling.bandcamp.com/album/perfect-life) in flac and mp3-320 formats with custom output template:\n```\nbandcamper -f flac -f mp3-320 -o \"{artist}/{album} ({year})/{ext}/{track_num:02d} - {track}.{ext}\" --output-extra \"{artist}/{album} ({year})/{filename}\" \"https://stippling.bandcamp.com/album/perfect-life\"\n\n```\nResults:\n```\nstippling\n\u2514\u2500\u2500 Perfect Life (2018)\n \u251c\u2500\u2500 cover.jpg\n \u251c\u2500\u2500 flac\n \u2502 \u251c\u2500\u2500 01 - My Friend Dead.flac\n \u2502 \u251c\u2500\u2500 02 - Oh My God.flac\n \u2502 \u251c\u2500\u2500 03 - Sunshine Kids.flac\n \u2502 \u251c\u2500\u2500 04 - Brights.flac\n \u2502 \u251c\u2500\u2500 05 - Monologue.flac\n \u2502 \u251c\u2500\u2500 06 - 2am.flac\n \u2502 \u251c\u2500\u2500 07 - Inner Dark.flac\n \u2502 \u251c\u2500\u2500 08 - Think of You.flac\n \u2502 \u251c\u2500\u2500 09 - Scared of Changing.flac\n \u2502 \u251c\u2500\u2500 10 - Ready Set Rock.flac\n \u2502 \u251c\u2500\u2500 11 - The Journal.flac\n \u2502 \u251c\u2500\u2500 12 - Letters to Ghosts.flac\n \u2502 \u251c\u2500\u2500 13 - Fake Smile.flac\n \u2502 \u2514\u2500\u2500 14 - Perfect Life.flac\n \u2514\u2500\u2500 mp3\n \u251c\u2500\u2500 01 - My Friend Dead.mp3\n \u251c\u2500\u2500 02 - Oh My God.mp3\n \u251c\u2500\u2500 03 - Sunshine Kids.mp3\n \u251c\u2500\u2500 04 - Brights.mp3\n \u251c\u2500\u2500 05 - Monologue.mp3\n \u251c\u2500\u2500 06 - 2am.mp3\n \u251c\u2500\u2500 07 - Inner Dark.mp3\n \u251c\u2500\u2500 08 - Think of You.mp3\n \u251c\u2500\u2500 09 - Scared of Changing.mp3\n \u251c\u2500\u2500 10 - Ready Set Rock.mp3\n \u251c\u2500\u2500 11 - The Journal.mp3\n \u251c\u2500\u2500 12 - Letters to Ghosts.mp3\n \u251c\u2500\u2500 13 - Fake Smile.mp3\n \u2514\u2500\u2500 14 - Perfect Life.mp3\n\n```\n\n## Contributing\n\nPull requests are welcome! We just released the alpha so right now our top priorities are **refactoring** and **testing**, but any contribution might be a good contribution :-). I also plan on replacing requests with httpx soon.\n\nIn order to start contributing with bandcamper's code, make sure you install the pre-commit hooks listed in the [.pre-commit-config.yaml](https://github.com/yyyyyyyan/bandcamper/blob/main/.pre-commit-config.yaml) file with the following commands:\n```bash\npip install -r requirements_dev.txt\npre-commit install\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/yyyyyyyan/bandcamper/blob/main/LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bandcamp downloader.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/yyyyyyyan/bandcamper",
"Repository": "https://github.com/yyyyyyyan/bandcamper"
},
"split_keywords": [
"bandcamp",
"downloader",
"music"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4b6cce6699a83566f44828187f792698d8cc9e2eef60810467ca53012b7ec849",
"md5": "b8a68e0028eef9589694a1e8af6a75b3",
"sha256": "adc6b059e9d5d5489f54542afa92349d6dd1b3467ff22df549875c294e748101"
},
"downloads": -1,
"filename": "bandcamper-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b8a68e0028eef9589694a1e8af6a75b3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 21708,
"upload_time": "2023-09-12T21:13:25",
"upload_time_iso_8601": "2023-09-12T21:13:25.151267Z",
"url": "https://files.pythonhosted.org/packages/4b/6c/ce6699a83566f44828187f792698d8cc9e2eef60810467ca53012b7ec849/bandcamper-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "40a1bf805182058a9717954b043d47f83cdbd48eb0b2b60bd9df83e2b4180482",
"md5": "ceda8fbdd6c83116ff15f2dc1503a3be",
"sha256": "7d3ada4e550b3dc99f3e5fe2299fcc4455f112b67264c7fbbbf7838b2899b195"
},
"downloads": -1,
"filename": "bandcamper-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "ceda8fbdd6c83116ff15f2dc1503a3be",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 19293,
"upload_time": "2023-09-12T21:13:28",
"upload_time_iso_8601": "2023-09-12T21:13:28.748973Z",
"url": "https://files.pythonhosted.org/packages/40/a1/bf805182058a9717954b043d47f83cdbd48eb0b2b60bd9df83e2b4180482/bandcamper-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-12 21:13:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yyyyyyyan",
"github_project": "bandcamper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "bandcamper"
}