Giter Site home page Giter Site logo

bandcamp-dl's Introduction

bandcamp-dl

download audio from BandCamp.com

Synopsis

bandcamp-dl URL

Installation

From PyPI

pip3 install bandcamp-downloader

Some linux distros may require that python3-pip is installed first.

From Wheel

  1. Download the wheel (.whl) from PyPI or the Releases page
  2. cd to the directory containing the .whl file
  3. pip install <filename>.whl

[OSX] From Homebrew

brew install bandcamp-dl

[Arch] From the AUR

yay -S bandcamp-dl-git

From Source

  1. Clone the project or download and extract the zip
  2. cd to the project directory containing the setup.py
  3. python setup.py install

Description

bandcamp-dl is a small command-line app to download audio from BandCamp.com. It requires the Python interpreter, version 3.4 (or higher) and is not platform specific. It is released to the public domain, which means you can modify it, redistribute it or use it how ever you like.

Details

Usage:
    bandcamp-dl [options] [URL]

Arguments:
    URL         Bandcamp album/track URL

Options

Options:
    -h --help               Show this screen.
    -v --version            Show version.
    -d --debug              Verbose logging.
    --artist=<artist>       The artist's slug (from the URL, --track or --album is required)
    --track=<track>         The track's slug (from the URL, for use with --artist)
    --album=<album>         The album's slug (from the URL, for use with --artist)
    --template=<template>   Output filename template.
                            [default: %{artist}/%{album}/%{track} - %{title}]
    --base-dir=<dir>        Base location of which all files are downloaded.
    -f --full-album         Download only if all tracks are available.
    -o --overwrite          Overwrite tracks that already exist. Default is False.
    -n --no-art             Skip grabbing album art.
    -e --embed-lyrics       Embed track lyrics (If available)
    -g --group              Use album/track Label as iTunes grouping.
    -r --embed-art          Embed album art (If available)
    -y --no-slugify         Disable slugification of track, album, and artist names.
    -c --ok-chars=<chars>   Specify allowed chars in slugify.
                            [default: -_~]
    -s --space-char=<char>  Specify the char to use in place of spaces.
                            [default: -]
    -a --ascii-only         Only allow ASCII chars (北京 (capital of china) -> bei-jing-capital-of-china)
    -k --keep-spaces        Retain whitespace in filenames
    -u --keep-upper         Retain uppercase letters in filenames

Filename Template

The --template option allows users to indicate a template for the output file names and directories. Templates can be built using special tokens with the format of %{artist}. Here is a list of allowed tokens:

  • trackartist: The artist name.
  • artist: The album artist name.
  • album: The album name.
  • track: The track number.
  • title: The track title.
  • date: The album date.
  • label: The album label.

The default template is: %{artist}/%{album}/%{track} - %{title}.

Bugs

Bugs should be reported here. Please include the URL and/or options used as well as the output when using the --debug option.

For discussions, join us in Discord.

When you submit a request, please re-read it once to avoid a couple of mistakes (you can and should use this as a checklist):

Are you using the latest version?

This should report that you're up-to-date. About 20% of the reports we receive are already fixed, but people are using outdated versions. This goes for feature requests as well.

Is the issue already documented?

Make sure that someone has not already opened the issue you're trying to open. Search at the top of the window or at Issues. If there is an issue, feel free to write something along the lines of "This affects me as well, with version 2015.01.01. Here is some more information on the issue: ...". While some issues may be old, a new post into them often spurs rapid activity.

Why are existing options not enough?

Before requesting a new feature, please have a quick peek at the list of supported options. Many feature requests are for features that actually exist already! Please, absolutely do show off your work in the issue report and detail how the existing similar options do not solve your problem.

Does the issue involve one problem, and one problem only?

Some of our users seem to think there is a limit of issues they can or should open. There is no limit of issues they can or should open. While it may seem appealing to be able to dump all your issues into one ticket, that means that someone who solves one of your issues cannot mark the issue as closed. Typically, reporting a bunch of issues leads to the ticket lingering since nobody wants to attack that behemoth, until someone mercifully splits the issue into multiple ones.

Is anyone going to need the feature?

Only post features that you (or an incapable friend you can personally talk to) require. Do not post features because they seem like a good idea. If they are really useful, they will be requested by someone who requires them.

Is your question about bandcamp-dl?

It may sound strange, but some bug reports we receive are completely unrelated to bandcamp-dl and relate to a different or even the reporter's own application. Please make sure that you are actually using bandcamp-dl. If you are using a UI for bandcamp-dl, report the bug to the maintainer of the actual application providing the UI. On the other hand, if your UI for bandcamp-dl fails in some way you believe is related to bandcamp-dl, by all means, go ahead and report the bug.

Dependencies

Copyright

bandcamp-dl is released into the public domain by the copyright holders

This README file was inspired by the youtube-dl docs and is likewise released into the public domain.

bandcamp-dl's People

Contributors

bendito999 avatar bjesus avatar dependabot[bot] avatar dgbc avatar dnicolson avatar evolution0 avatar gryf avatar iheanyi avatar jbkahn avatar jedomed avatar jneidel avatar joj0 avatar josefnpat avatar kstrafe avatar mixbo avatar nightdavisao avatar nzen avatar oaubert avatar pedrolopes avatar ppatrzyk avatar schniz avatar singingwolfboy avatar superusercode avatar szabgab avatar travishsu avatar vladdesv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bandcamp-dl's Issues

Unable to install on OS X 10.11.3

Hi,

trying to install using different versions of python (3.5 didn't work, tried 2.7 and got a bit further I think) and getting nowhere. This window keeps popping up but I'm not keen on downloading all of Xcode just for this command-line app (probably won't fix my problem anyhow).

Terminal's version of the issue is as follows (two of the bold parts being what showed in red in terminal, other bold/italics parts just interpreted by github and I did not want to find and escape it all):

my-MacBook-Pro:bandcamp-dl-master username$ pip install -r requirements.txt
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4==4.4.1 in /Library/Python/2.7/site-packages/beautifulsoup4-4.4.1-py2.7.egg (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): docopt==0.6.2 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Collecting lxml==3.5.0 (from -r requirements.txt (line 3))
Using cached lxml-3.5.0.tar.gz
Collecting mutagen==1.31 (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): ply==3.4 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 5))
Collecting requests==2.8.1 (from -r requirements.txt (line 6))
Using cached requests-2.8.1-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): slimit==0.8.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 7))
Collecting slugify==0.0.1 (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): wgetter==0.6 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from -r requirements.txt (line 9))
Building wheels for collected packages: lxml
Running setup.py bdist_wheel for lxml ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;file='/private/var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-build-aK_JAK/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" bdist_wheel -d /var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/tmp5IQUOfpip-wheel- --python-tag cp27:
Building lxml version 3.5.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/init.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/elementpath.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.6-intel-2.7/lxml
creating build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/includes
creating build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/diffcommand.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/html5builder.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/setmixin.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.6-intel-2.7/lxml/includes
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/src
creating build/temp.macosx-10.6-intel-2.7/src/lxml
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -Isrc/lxml/includes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Compile failed: command '/usr/bin/clang' failed with exit status 1
creating var
creating var/folders
creating var/folders/g

creating var/folders/g
/y6drsh013k7b_kmk8n8htry00000gn
creating var/folders/g
/y6drsh013k7b_kmk8n8htry00000gn/T
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /var/folders/g
/y6drsh013k7b_kmk8n8htry00000gn/T/xmlXPathInithEjNFb.c -o var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/xmlXPathInithEjNFb.o
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.


Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install


error: command '/usr/bin/clang' failed with exit status 1


Failed building wheel for lxml
Running setup.py clean for lxml
Failed to build lxml
Installing collected packages: lxml, mutagen, requests, slugify
Running setup.py install for lxml ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;file='/private/var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-build-aK_JAK/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-79JInE-record/install-record.txt --single-version-externally-managed --compile:
Building lxml version 3.5.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/init.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/_elementpath.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/builder.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/cssselect.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/doctestcompare.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/ElementInclude.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/pyclasslookup.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/sax.py -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/usedoctest.py -> build/lib.macosx-10.6-intel-2.7/lxml
creating build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/includes
creating build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/html5builder.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/setmixin.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/builder.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/clean.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/defs.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/diff.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/formfill.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.macosx-10.6-intel-2.7/lxml/html
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron
copying src/lxml/lxml.etree.h -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.macosx-10.6-intel-2.7/lxml
copying src/lxml/includes/c14n.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xpath.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.macosx-10.6-intel-2.7/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.macosx-10.6-intel-2.7/lxml/includes
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/rng
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl
creating build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.macosx-10.6-intel-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/src
creating build/temp.macosx-10.6-intel-2.7/src/lxml
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include/libxml2 -Isrc/lxml/includes -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-intel-2.7/src/lxml/lxml.etree.o -w -flat_namespace
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
Compile failed: command '/usr/bin/clang' failed with exit status 1
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /var/folders/g
/y6drsh013k7b_kmk8n8htry00000gn/T/xmlXPathInit6au2LF.c -o var/folders/g
/y6drsh013k7b_kmk8n8htry00000gn/T/xmlXPathInit6au2LF.o
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
*********************************************************************************
Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
Perhaps try: xcode-select --install
*********************************************************************************
error: command '/usr/bin/clang' failed with exit status 1

----------------------------------------

Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools, tokenize;file='/private/var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-build-aK_JAK/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-79JInE-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/g_/y6drsh013k7b_kmk8n8htry00000gn/T/pip-build-aK_JAK/lxml/


Not sure what to try next, maybe I messed up how wheels is installed because I tried to install pip onto osx's native/preinstalled version of python (as the pip site says not to do)?

Make it work on track hyperlinks

I have a couple stand-alone tracks I want to download, which are not available on any albums. When I use the /track/ hyperlink, I get traceback errors, because album title is not defined. Any chance this can be expanded so if the album title is not defined, it uses the track title as the album title with "(single)" appended to the end?

I think it would also be useful if full discography was an option - just enter the base bandcamp hyperlink, and it will download all releases for that artist

I'm having trouble confirming I'm using the latest version. I have 1.0 installed, but I can't find what the current version on here is.

Roadmap

0.0.6

  • Individual track downloads (KeyError: 'album_title')
    Note: Could use more testing, but haven't run into issues yet.
  • --no-art option

On hold:

  • --embed-lyrics option
    Note: Duplicates lyrics (adds a second Lyrics tag) even if lyrics already exist.

Cygwin install instructions

Hello,

First, thank you very much for this great tool !

I thought it may be handy to add install instructions for Cygwin, so there are the package I needed to install using apt-cyg:

apt-cyg install libxml2-devel libiconv-devel libxslt-devel

Then I was able to pip install bandcamp-downloader without gcc crashing while Running setup.py install for lxml.

I still had to install the requests lib manually as it seems to be missing from you dependencies:

Traceback (most recent call last):
  File "/cygdrive/c/Users/admin/.local/bin/bandcamp-dl", line 9, in <module>
    load_entry_point('bandcamp-downloader==0.0.3', 'console_scripts', 'bandcamp-dl')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 552, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2672, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2345, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/cygdrive/c/Users/admin/.local/lib/python2.7/site-packages/bandcamp_dl/bandcamp_dl.py", line 42, in <module>
    from Bandcamp import Bandcamp
  File "/cygdrive/c/Users/admin/.local/lib/python2.7/site-packages/bandcamp_dl/Bandcamp.py", line 2, in <module>
    import requests
ImportError: No module named requests

ImportError: No module named requests

Looks like a missing dependency.

$ bandcamp-dl --help
Traceback (most recent call last):
  File "/usr/local/bin/bandcamp-dl", line 7, in <module>
    from bandcamp_dl.bandcamp_dl import main
  File "/usr/local/lib/python2.7/site-packages/bandcamp_dl/bandcamp_dl.py", line 42, in <module>
    from Bandcamp import Bandcamp
  File "/usr/local/lib/python2.7/site-packages/bandcamp_dl/Bandcamp.py", line 2, in <module>
    import requests
ImportError: No module named requests

The workaround is simple enough:

$ pip install requests
$ bandcamp-dl --help
... (expected output)

Downloading stopped to work

I'm getting following error (changed JS EmbedData format?):

Traceback (most recent call last):
File "./bandcamp_dl/bandcamp_dl.py", line 67, in
main()
File "./bandcamp_dl/bandcamp_dl.py", line 55, in main
album = bandcamp.parse(url)
File "/home/administrator/BCRip/bandcamp-dl-master/bandcamp-dl/bandcamp_dl/Bandcamp.py", line 28, in parse
album_meta = self.extract_album_meta_data(r)
File "/home/administrator/BCRip/bandcamp-dl-master/bandcamp-dl/bandcamp_dl/Bandcamp.py", line 67, in extract_album_meta_data
embedData = self.get_embed_string_block(request)
File "/home/administrator/BCRip/bandcamp-dl-master/bandcamp-dl/bandcamp_dl/Bandcamp.py", line 102, in get_embed_string_block
embedStringBlock = jsobj.read_js_object("var EmbedData = %s" % embedStringBlock)
File "/home/administrator/BCRip/bandcamp-dl-master/bandcamp-dl/bandcamp_dl/jsobj.py", line 72, in read_js_object
return visit(Parser().parse(code))
File "/usr/lib64/python2.7/site-packages/slimit/parser.py", line 56, in init
self.lexer.build(optimize=lex_optimize, lextab=lextab)
File "/usr/lib64/python2.7/site-packages/slimit/lexer.py", line 102, in build
self.lexer = ply.lex.lex(object=self, **kwargs)
File "/usr/lib64/python2.7/site-packages/ply/lex.py", line 897, in lex
if '.' not in lextab:
TypeError: argument of type 'module' is not iterable

Downloading album issue

nicks-mac-mini:bandcamp-dl nick$ python bandcamp-dl.py http://liluglymane.bandcamp.com/album/third-side-of-tape
Traceback (most recent call last):
File "bandcamp-dl.py", line 56, in
album = bandcamp.parse(url)
File "/Users/nick/Documents/bandcamp-dl-master/bandcamp-dl/Bandcamp.py", line 28, in parse
album_meta = self.extract_album_meta_data(r)
File "/Users/nick/Documents/bandcamp-dl-master/bandcamp-dl/Bandcamp.py", line 67, in extract_album_meta_data
embedData = self.get_embed_string_block(request)
File "/Users/nick/Documents/bandcamp-dl-master/bandcamp-dl/Bandcamp.py", line 100, in get_embed_string_block
embedStringBlock = jsobj.read_js_object("var EmbedData = %s" % embedStringBlock)
File "/Users/nick/Documents/bandcamp-dl-master/bandcamp-dl/jsobj.py", line 71, in read_js_object
return visit(Parser().parse(code))
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slimit/parser.py", line 56, in init
self.lexer.build(optimize=lex_optimize, lextab=lextab)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/slimit/lexer.py", line 102, in build
self.lexer = ply.lex.lex(object=self, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ply/lex.py", line 893, in lex
if '.' not in lextab:
TypeError: argument of type 'module' is not iterable
nicks-mac-mini:bandcamp-dl nick$

Track, Artist, Album search

Most definitely possible to add though it would be a separate component as it is essentially a frontend.

I have played around with it a bit and its quite easy to just append a search term to the search url, request it, and use BeautifulSoup to grab the element containing the result type (Artist, Album, Track) and url. Just not sure how I want to implement it yet as there is the possibility that a search wouldn't turn up an exact match.

Maybe print out the top 5 results by default and allow the user to then filter by type (and display more results)

Possibly as a separate repo.

Couldn't download album art.

I printed out r.text and self.soup in Bandcamp.parse(), and found that in self.soup the html gets cut short, while r.text contains the full html.

Using BeautifulSoup with html5lib instead of lxml fixes the issue.

I'm using python 2.7.6 on Windows 7, by the way.

How to run?

I was able to install all the listed dependencies on Ubuntu 14.04 with something along the lines of;

sudo apt-get install python-mutagen python-bs4 python-requests slimit pip
sudo pip install docopt wgetter

When I run this I get the following error:

~/repos/bandcamp-dl/bandcamp-dl♠ python2 bandcamp-dl.py 
Traceback (most recent call last):
  File "bandcamp-dl.py", line 43, in <module>
    from BandcampDownloader import BandcampDownloader
  File "/home/seppi/repos/bandcamp-dl/bandcamp-dl/BandcampDownloader.py", line 7, in <module>
    from slugify import slugify
ImportError: No module named slugify

Non existing directory in --base-dir produces crash

[/tmp/bandcamp-dl/bandcamp-dl]; python2 bandcamp-dl.py http://realfaction.bandcamp.com/album/planet-pulse-deluxe-edition --base-dir=/does-not-exist/
Traceback (most recent call last):
  File "bandcamp-dl.py", line 65, in <module>
    bandcamp_downloader.start(album)
  File "/tmp/bandcamp-dl/bandcamp-dl/BandcampDownloader.py", line 26, in start
    self.download_album(album)
  File "/tmp/bandcamp-dl/bandcamp-dl/BandcampDownloader.py", line 56, in download_album
    filename = self.template_to_path(track_meta)
  File "/tmp/bandcamp-dl/bandcamp-dl/BandcampDownloader.py", line 34, in template_to_path
    path = u"{0}/{1}.{2}".format(self.directory, path, "mp3")
AttributeError: BandcampDownloader instance has no attribute 'directory'

The problem seems to be here:

if os.path.isdir(directory):

It just doesn't handle the directory not existing

Documentation

Currently trying to work out a neat and manageable documentation method, personally I favor Function Annotation + Docstrings in ReStructuredText.

I'm currently setting the code up as such in my PyCharm project along with the pytests.

Should the PyCharm project files be included in future commits?

Service Unavailable 503

Have you guys seen this before ?

C:\Python27\Scripts\bandcamp-dl\bandcamp_dl>bandcamp_dl.py -f https://dynamitemo
tel.bandcamp.com/
Starting download process.
Accessing track 1 of 12
HTTP Error 503: Service Unavailable
Downloading failed..

Let me know if you could give me a lead on this. I have tried several times.

The url {} is not a valid bandcamp page

Ok so i recently wanted to check this project out, now it should be pretty straight forward, when i run this command(or any other url for that matter):

python bandicamp-dl.py https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll

i get the following error:

File "bandcamp-dl.py", line 60
    print "The url {} is not a valid bandcamp page.".format(url)

SyntaxError: invalid syntax

no matter what i try i cant figure out what is causing this, im running ArchLinux and i have tried with python 2&3

Unicode error

Hi, after upgrading I get a (python 2.7)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 192: ordinal not in range(128)

Maybe it could be due to some incompabilties with other libraries, I have this with pip list (sorry for the long list) :
alabaster (0.7.8)
all (0.0.2)
alot (0.3.6)
ansible (2.2.0.0)
apt-p2p (0.1.5)
arandr (0.1.9)
argcomplete (1.7.0)
argh (0.26.1)
args (0.1.0)
argvalidate (0.9.0)
arrow (0.10.0)
attrs (16.3.0)
Babel (2.3.4)
backports.shutil-get-terminal-size (1.0.0)
bandcamp-downloader (0.0.5)
BeautifulSoup (3.2.1)
beautifulsoup4 (4.5.1)
blessings (1.6)
burn (0.4.6)
bzr (2.8.0.dev1)
CDDB (1.4)
certifi (14.5.14)
cffi (1.7.0)
chardet (2.3.0)
clamd (1.0.1)
click (4.1)
clint (0.4.1)
cluster (1.1.1b3)
cmigemo (0.1.5)
commando (0.3.4)
configobj (5.0.6)
configparser (3.3.0.post2)
constantly (15.1.0)
contract (1.4)
cryptography (1.5.3)
cssselect (0.9.1)
darts.util.lru (0.5)
decorator (4.0.6)
demjson (2.2.2)
DisplayCAL (3.2.2.0)
dnspython (1.15.0)
docopt (0.6.2)
docutils (0.13.1)
ears (1.0.1)
eg (0.1.0)
enum34 (1.1.6)
esmre (0.3.1)
eyeD3 (0.7.10)
feedparser (5.1.3)
file-magic (0.3.0)
fontypython (0.4.6)
fpconst (0.7.2)
fudge (1.0.3)
futures (2.1.5)
galternatives (0.9)
GeoIP (1.3.2)
getmail (4.52.0)
gitdb (0.6.4)
GitPython (0.3.2rc1)
gmvault (1.9.1)
gnupg (2.0.2)
guess-language (0.2)
gyp (0.1)
hachoir-core (1.3.3)
hachoir-metadata (1.3.3)
hachoir-parser (1.3.4)
halberd (0.2.4)
howdoi (1.1.7)
html5lib (1.0b8)
http-parser (0.8.3)
httplib2 (0.9.2)
hurry.filesize (0.9)
idna (2.1)
imagesize (0.7.1)
IMAPClient (0.13)
imaplib2 (2.55)
incremental (16.10.1)
ipaddr (2.1.11)
ipaddress (1.0.17)
ipython (5.1.0)
ipython-genutils (0.1.0)
ircamhosts (0.7.1)
ircamldap (0.6.4)
isbg (0.99)
jack (3.1.1)
jedi (0.9.0)
jellyfish (0.5.6)
Jinja2 (2.8)
keyring (10.1)
kitchen (1.2.4)
launchpadlib (1.10.4)
lazr.restfulclient (0.13.4)
lazr.uri (1.0.3)
liblarch (2.1.0)
libvirt-python (2.4.0)
Logbook (0.10.1)
lxml (3.7.1)
mailnag (1.2.1)
Mako (1.0.4)
Markdown (2.6.1)
MarkupSafe (0.23)
mercurial (4.0)
msgpack-python (0.4.4)
munkres (1.0.8)
mutagen (1.36)
ndg-httpsclient (0.3.3)
netaddr (0.7.18)
NetEase-MusicBox (0.1.0.4)
netifaces (0.10.4)
nltk (3.0.1)
notmuch (0.23.3)
numpy (1.11.2)
oauth (1.0.1)
ohmu (0.5.0)
Pafy (0.3.62)
PAM (0.4.2)
paramiko (2.0.0)
Parsley (1.2)
passpie (0.2.1)
pathlib (1.0.1)
pathlib2 (2.1.0)
pdfminer (20140328)
pexpect (4.2.1)
phply (0.9.1)
pickleshare (0.7.4)
Pillow (3.4.2)
pip (8.1.2)
PLWM (2.6a0)
ply (3.9)
pocket (0.3.6)
powerline-status (dev)
prompt-toolkit (0.59)
psutil (2.2.1)
ptpython (0.27)
ptyprocess (0.5.1)
pyasn1 (0.1.3)
pyasn1-modules (0.0.7)
pybloomfiltermmap (0.3.11)
pycparser (2.17)
pycrypto (2.6.1)
pycurl (7.43.0)
pydns (2.3.6)
pyfiglet (0.7.5)
pyflakes (1.0.0)
PyGithub (1.21.0)
Pygments (2.1.3)
pygmi (0.2)
pygobject (3.22.0)
pygpgme (0.3)
pygraphviz (1.3.1)
pyinotify (0.9.6)
pyliblzma (0.5.3)
pylogsparser (0.4)
pymad (0.9)
pymongo (3.3.1)
pyogg (1.3)
pyOpenSSL (0.13.1)
pyquery (1.2.9)
pyscard (1.9.4)
pyserial (3.2.1)
PySocks (1.6.5)
pysqlite (2.6.3)
pyte (0.4.10)
python-apt (1.1.0b5)
python-dateutil (2.4.2)
python-debian (0.1.29)
python-debianbts (2.6.1)
python-distutils-extra (2.39)
python-djvulibre (0.8)
python-hglib (2.2)
python-ldap (2.4.28)
python-magic (0.4.6)
python-musicbrainz2 (0.7.4)
python-ntlm (1.0.1)
python-slugify (1.2.0)
python-xlib (0.14)
pytz (2016.7)
pyvorbis (1.5)
pyxdg (0.25)
pyxp (0.2)
PyYAML (3.12)
rainbowstream (1.3.7)
ranger (1.7.1)
rencode (1.0.5)
reportbug (6.6.6)
requests (2.6.0)
requests-cache (0.4.10)
roman (2.0.0)
scapy-real (2.2.0.dev0)
scdl (1.1.0)
SecretStorage (2.3.1)
selenium (2.53.2)
service-identity (16.0.0)
setuptools (32.0.0)
simplegeneric (0.8.1)
simplejson (3.10.0)
simplemediawiki (1.1.1)
six (1.10.0)
slimit (0.8.1)
slugify (0.0.1)
smart (1.4)
smmap (0.9.0)
soundcloud (0.4.1)
Sphinx (1.4.8)
sphinx-rtd-theme (0.1.9)
SQLAlchemy (0.9.7)
stopit (1.1.0)
tabulate (0.7.5)
task-indicator (1.40)
tblib (0.2.0)
termcolor (1.1.0)
terminal-velocity (0.1.9)
tinydb (2.3.2)
torbrowser-launcher (0.2.6)
traitlets (4.3.1)
tritium (0.3.8)
Twisted (16.6.0)
Twisted-Lore (15.2.1)
Twisted-Web2 (8.1.0)
twitter (1.17.1)
txsocksx (0.0.0)
unicode-slugify (0.1.3)
Unidecode (0.4.19)
urllib3 (1.16)
urwid (1.1.1)
urwidtrees (1.0)
uTidylib (0.3)
uzbl (201100808)
virtualbricks (1.0.2)
virtualenv (15.1.0)
vulndb (0.0.17)
wadllib (1.3.2)
wcwidth (0.1.6)
webencodings (0.5)
wget (2.2)
wgetter (0.6)
wheel (0.29.0)
wxPython (3.0.2.0)
wxPython-common (3.0.2.0)
xdot (0.6)
xpra (0.17.6)
yagtd (0.3.4)
zope.interface (4.3.2)

Else, if I try with pip3 install, I get a :

Traceback (most recent call last):
File "/usr/local/bin/bandcamp-dl", line 7, in from bandcamp_dl.bandcamp_dl import main File "/usr/local/lib/python3.5/dist-packages/bandcamp_dl/bandcamp_dl.py", line 45, in from bandcamp import Bandcamp ImportError: No module named 'bandcamp'

Thanks for your help

jsobj, slimit, ply. Are they truly needed?

As far as I know slimit and ply are used by jsobj.py just for grabbing metadata from the JavaScript on the page, the only reason I can see this being a good idea is if it is generated dynamically. If it isn't generated dynamically and just happens to be contained in the variables within the JavaScript then there is no reason it can't be retrieved with BeautifulSoup and re.

Especially since we get errors (albeit harmless) that throw users off and make them think something is broken because of slimit. (and it adds overhead)

I have tested and proven that we can get the same data with:

from bs4 import BeautifulSoup
import requests
import re
r = requests.get("http://guiguisuisui.bandcamp.com/album/wu-xing")
soup = BeautifulSoup(r.text, 'html.parser')
data = soup.find('div', id='pgBd').find_all("script", {"src":False})[1].string
embedStringBlock = re.search(r"(?<=var\sEmbedData\s=\s)[^;]*", data)
stringBlock = re.search(r"(?<=var\sTralbumData\s=\s)[^;]*", data).group()

Now embedStringBlock.group() is:

{
    tralbum_param: { name: "album", value: 3639706989 }, 
    album_title: "Wu Xing《五行》",
    linkback: "http://guiguisuisui.bandcamp.com" + "/album/wu-xing",
    art_id: 3123380105,
    artist: "The GUIGUISUISUI Show",
    swf_base_url: "https://bandcamp.com",
    show_campaign: null, 
    embed_info: {"exclusive_embeddable":null,"no_track_preorder":false,"item_public":true,"public_embeddable":"25 Jul 2016 00:52:33 GMT"}
}

While stringBlock.group() is:

{
    // For the curious:
    // http://bandcamp.com/help/audio_basics#steal
    // http://bandcamp.com/terms_of_use
    current: {"new_desc_format":1,"require_email_0":null,"title":"Wu Xing《五行》","upc":null,"release_date":"25 Jul 2016 00:00:00 GMT","selling_band_id":3829051480,"auto_repriced":null,"artist":null,"publish_date":"25 Jul 2016 00:52:33 GMT","new_date":"20 Jul 2016 04:13:03 GMT","art_id":3123380105,"minimum_price":7.0,"credits":"Part 1: Wuxing.\r\nAll songs written by GUIGUISUISUI, specifically Lady Chakra and Lord Kamemameha.\r\n\r\nLady Chakra: vocals, beats, percussion.\r\nLord Kamemameha: guitars, bass, backing vocals, synths, beats, Buddah Machine.\r\nJarrod Williams, Nick Sanders, Cab, Joseph Imbruglia, Gemma Holloway: backing vocals on ‘Low Interest Salvation’.\r\n\r\nRecorded by Yang Haisong at Psychic Kong in Beijing, China and in an apple tree in Dartford, England. Mixed and mastered by Li Shenjie at Ran Music in Beijing, China.\r\n\r\nThanks to our parents, Chacha, and all our friends across the world. Make love, not profit.","killed":null,"set_price":7.0,"private":null,"featured_track_id":1697261349,"purchase_url":null,"is_set_price":null,"download_pref":2,"id":3639706989,"download_desc_id":null,"band_id":3829051480,"about":"Wu Xing is the first of three EPs that GUIGUISUISUI intends to release, each one themed around one pair of characters from their live performance. The first one is based around the characters of Lord Kamemameha and Lady Chakra, blending ambient sounds, electronic beats with psychedelic guitars and effects laden vocals. Recorded with Yang Haisong (P.K.14, Dear Eloise, After Argument) at Psychic Kong studios and mixed by Shen Lijie (Ran Music) in Beijing, Wu Xing is a collection of songs that conceptually could be interpreted as Kamemameha and Chakra’s eulogy to Neo-Liberalism, inviting listeners to take their hands and be led to a paradise of low-interest, high profit salvation. Yet the bittersweet irony of this tribute is not hard to divine given the EP’s title, drawn from the ancient Chinese theory of the five phases. Perhaps the message is that truth lies beyond greed and materialism and that change is a constant which we cannot avoid. Perhaps the question is whether we are willing to accept change and move with it, or else be forever be consumed by false idols: like an eternal eclipse you will only know the shadow of the moon unless you’re prepared to look beyond.\r\n\r\n这是乐队成员由一人进化成两人以来第一次的正式合作录制,历经一年的时间创作制作。乐队的万物合一,和而不同的实验风格理念,包含了宇宙的东与西,男与女,阴与阳。男性意识与女性意识的结合,阴阳结合后的音乐风格进化出刚中带柔的那种温柔的坚强。“五行”是关乎自然的呈现与持续运作,“五行”意味着万事万物运动;意味着万物之宗。艺术创作的呈现与持续运作,艺术创造者与观者之间的运动,创造了创造本身。阴阳是宇宙的基本法则,宇宙间一切事物都由阴阳相互作用而产生,五行是阴阳的不同的组合状态;五行是阴阳交互运动的不同阶段。任何事物都不是孤立、静止的,而是在不断的相生、相克的运动中维持协调平衡的。该相生的继续相生,该相克的依然会相克,但相生相克必须各自为道,运动创造能量,使之平衡协调。五行是五种动态平衡的运动方式,而非实在的某种特定的元素,专辑里的每一首歌看似是一个独立的元素但却以平衡圆融的方式画着这个宇宙的轨迹。而连接这个轨迹的,就是我与你,男与女,阴与阳和而不同,相生相克的能量。","purchase_title":null,"type":"album","minimum_price_nonzero":7.0,"require_email":null,"audit":0,"mod_date":"25 Jul 2016 00:52:33 GMT"},
    is_preorder: null,
    album_is_preorder: null,
    album_release_date: "25 Jul 2016 00:00:00 GMT",
    preorder_count: null,
    hasAudio: true,
    art_id: 3123380105,
    trackinfo: [{"play_count":0,"free_album_download":false,"title":"Low Interest Salvation","video_caption":null,"title_link":"/track/low-interest-salvation-2","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":180.0,"encodings_id":1707229191,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":1,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":1697261349,"id":1697261349,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=ed37edf1b286591ee25996d3d380dbad&id=1697261349&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Zombie Land","video_caption":null,"title_link":"/track/zombie-land","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":157.68,"encodings_id":1183151814,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":2,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":3676394946,"id":3676394946,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=8e28b82ea8d3830a623c444db2b6cd1c&id=3676394946&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Automatic Vedic Machine","video_caption":null,"title_link":"/track/automatic-vedic-machine","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":110.0,"encodings_id":2155125546,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":3,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":1998868613,"id":1998868613,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=b3683a78995595b25898a413eb868d05&id=1998868613&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Shadow Of The Moon","video_caption":null,"title_link":"/track/shadow-of-the-moon-2","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":384.0,"encodings_id":2475846926,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":4,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":2774147203,"id":2774147203,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=57d6cce197ac1edfdb9d1752cbc939eb&id=2774147203&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Li River pt.1","video_caption":null,"title_link":"/track/li-river-pt-1","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":434.0,"encodings_id":3099053948,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":5,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":962639839,"id":962639839,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=2c75feba57eadbb903a9a0583beb981c&id=962639839&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Li River pt.2","video_caption":null,"title_link":"/track/li-river-pt-2","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":726.0,"encodings_id":3164983760,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":6,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":4135289073,"id":4135289073,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=0d3fd268f18fd740d5fe6f5fe5d5d3b8&id=4135289073&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Automatic Vedic Machine (thruoutin remix)","video_caption":null,"title_link":"/track/automatic-vedic-machine-thruoutin-remix","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":193.142,"encodings_id":3397522343,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":7,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":583339248,"id":583339248,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=71a56563c62091c7e56a239712deb859&id=583339248&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Shadow Of The Moon (Lastboss remix)","video_caption":null,"title_link":"/track/shadow-of-the-moon-lastboss-remix","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":232.0,"encodings_id":775503805,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":8,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":3093963811,"id":3093963811,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=a938fc2ecf207e705af8a33c4322b5c8&id=3093963811&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false},{"play_count":0,"free_album_download":false,"title":"Low Interest Salvation (Dee remix)","video_caption":null,"title_link":"/track/low-interest-salvation-dee-remix","license_type":1,"is_capped":false,"sizeof_lyrics":0,"video_featured":null,"has_lyrics":false,"video_source_type":null,"duration":571.94,"encodings_id":3603112759,"alt_link":null,"has_info":false,"private":null,"video_source_id":null,"is_draft":false,"lyrics":null,"track_num":9,"encoding_error":null,"video_id":null,"is_downloadable":true,"track_id":4013684381,"id":4013684381,"video_mobile_url":null,"streaming":1,"album_preorder":false,"encoding_pending":null,"has_free_download":null,"file":{"mp3-128":"//popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=1bdc1b913d6820eda1527d2230092c66&id=4013684381&stream=1&ts=1482192666.0"},"video_poster_url":null,"unreleased_track":false}],
    playing_from: "album page",
    featured_track_id: 1697261349,
    initial_track_num: null,
    packages: null,
    url: "http://guiguisuisui.bandcamp.com" + "/album/wu-xing",
    defaultPrice: 7.0,
    freeDownloadPage: null,
    FREE: 1,
    PAID: 2,
    artist: "The GUIGUISUISUI Show",
    item_type: "album", // xxx: note - don't internationalize this variable
    id: 3639706989,
    last_subscription_item: null,
    has_discounts: null,
    is_bonus: null,
    play_cap_data: {"streaming_limit":3,"streaming_limits_enabled":true},
    client_id_sig: "i4Ug1nDz5GaOFBdT00QHqPl4nzY=",
    is_purchased: null,
    is_private_stream: null,
    is_band_member: null
}

Though admittedly that is more info than we need, but as you can see all the data is there.

3 lines to get the bulk of the data we use, that is it. From there it is a matter of tweaking the functions that separate the data into the pieces we need like artist, album name, etc

Then we can do away with actually parsing the JavaScript.

bandcamp-dl: command not found

Just installed on OS X 10.11.4 following instructions on README file, I get this output:

$ bandcamp-dl http://bandcampurl.com/
-bash: bandcamp-dl: command not found

How do I use this on Windows 8?

I'm a complete newbie with this, but this script seems to be pretty neat. Can someone publish a "for dummies" step-by-step guide on this??

THANKS!!! :)

How to get faster download?

Maybe it might just be happening on my end but does anyone know how to get faster downloading speed with this program? What seems to be happening is that it starts out with my max internet speed which is around 1.5 - 2MBs per sec for a few seconds then gets capped down to 40KB and 55 KB per sec when it tries downloading each song. Is there a fix or workaround for this?

Interrupted downloads

If you lose connection the file download will pause and resume when reconnected. This is good.

If you interrupt the download (kill the script) you can end up with broken files that bandcamp-dl will then skip on next execution because it does not check if they actually completed, just that they exist. This is bad.

Speed throttling while downloading

I guess this won't be solveable, but I'll post it anyways. The download always begins at a very high speed (~ 3 Mbit/s) before being throttled to ~45 Kbit/s.

Song title with forward slashes

If the song title contains a forward slash '/', a new folder will be created with the first half of the title and the file will be put into this folder.

Flac

Is It possibLe to downloadd flac verions?

Delete this issue... no longer needed

Thanks bendito for your help earlier!

However, I went through all the steps and ran into an error that says:

Traceback (most recent call last):
File "bandcamp-dl.py", line 41, in
from docopt import docopt
Import error: No module named docopt

TypeError: argument of type 'module' is not iterable and InsecurePlatformWarning

from:
python bandcamp-dl.py -f https://nicoledollanganger.bandcamp.com/album/greta-gibson-forever | --artist=nicoledollanganger --album=greta-gibson-forever
I get this warning:

-bash: --artist=nicoledollanganger: command not found
/Library/Python/2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Traceback (most recent call last):
  File "bandcamp-dl.py", line 56, in <module>
    album = bandcamp.parse(url)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 28, in parse
    album_meta = self.extract_album_meta_data(r)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 67, in extract_album_meta_data
    embedData = self.get_embed_string_block(request)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 100, in get_embed_string_block
    embedStringBlock = jsobj.read_js_object("var EmbedData = %s" % embedStringBlock)
  File "/Users/dd9000/Downloads/bandcamp-dl/jsobj.py", line 71, in read_js_object
    return visit(Parser().parse(code))
  File "/Library/Python/2.7/site-packages/slimit/parser.py", line 56, in __init__
    self.lexer.build(optimize=lex_optimize, lextab=lextab)
  File "/Library/Python/2.7/site-packages/slimit/lexer.py", line 102, in build
    self.lexer = ply.lex.lex(object=self, **kwargs)
  File "/Library/Python/2.7/site-packages/ply/lex.py", line 893, in lex
    if '.' not in lextab:
TypeError: argument of type 'module' is not iterable

OS X 10.10.3, Python 2.7.6

Looking up the InsecurePlatformWarning, I found this page.

I still had the rest of the error message became:

Traceback (most recent call last):
  File "bandcamp-dl.py", line 56, in <module>
    album = bandcamp.parse(url)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 28, in parse
    album_meta = self.extract_album_meta_data(r)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 67, in extract_album_meta_data
    embedData = self.get_embed_string_block(request)
  File "/Users/dd9000/Downloads/bandcamp-dl/Bandcamp.py", line 100, in get_embed_string_block
    embedStringBlock = jsobj.read_js_object("var EmbedData = %s" % embedStringBlock)
  File "/Users/dd9000/Downloads/bandcamp-dl/jsobj.py", line 71, in read_js_object
    return visit(Parser().parse(code))
  File "/Library/Python/2.7/site-packages/slimit/parser.py", line 56, in __init__
    self.lexer.build(optimize=lex_optimize, lextab=lextab)
  File "/Library/Python/2.7/site-packages/slimit/lexer.py", line 102, in build
    self.lexer = ply.lex.lex(object=self, **kwargs)
  File "/Library/Python/2.7/site-packages/ply/lex.py", line 893, in lex
    if '.' not in lextab:
TypeError: argument of type 'module' is not iterable

Ascii codec error

It doesn't look like this repo is maintained anymore, but just in case it is, I've gotten the following error (reproducible):

'ascii' codec can't decode byte 0xe7 in position 9: ordinal not in range(128)
Downloading failed..

The album in question is here: https://dohits.bandcamp.com/album/do-hits-vol-4. It fails consistently on the second track, which has a Chinese character in it.

crash on KeyError: 'album_title'?

Hey @iheanyi, just to let you know that when I try this:
bandcamp-dl https://gregorylenczycki.bandcamp.com/track/str-qrt-no-one

I get:

Traceback (most recent call last):
  File "/usr/local/bin/bandcamp-dl", line 9, in <module>
    load_entry_point('bandcamp-downloader==0.0.3', 'console_scripts', 'bandcamp-dl')()
  File "/Library/Python/2.7/site-packages/bandcamp_dl/bandcamp_dl.py", line 55, in main
    album = bandcamp.parse(url)
  File "/Library/Python/2.7/site-packages/bandcamp_dl/Bandcamp.py", line 28, in parse
    album_meta = self.extract_album_meta_data(r)
  File "/Library/Python/2.7/site-packages/bandcamp_dl/Bandcamp.py", line 76, in extract_album_meta_data
    album['title'] = embedData['EmbedData']['album_title']
KeyError: 'album_title'

This was done with the latest version, i even installed fresh:

pedro:bandcamp_dl pedro$ sudo pip install bandcamp-downloader
Downloading/unpacking bandcamp-downloader
  Downloading bandcamp-downloader-0.0.3.tar.gz
  Running setup.py (path:/private/tmp/pip_build_root/bandcamp-downloader/setup.py) egg_info for package bandcamp-downloader

    warning: no files found matching '*.rst'
    warning: no previously-included files found matching '*.mp3'
    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.DS_STORE' found anywhere in distribution
Requirement already satisfied (use --upgrade to upgrade): wgetter>=0.6 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): slimit>=0.8.1 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): ply==3.4 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.31 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): lxml>=3.5.0 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): docopt>=0.6.2 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4.4.1 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): slugify==0.0.1 in /Library/Python/2.7/site-packages (from bandcamp-downloader)
Installing collected packages: bandcamp-downloader
  Running setup.py install for bandcamp-downloader

    warning: no files found matching '*.rst'
    warning: no previously-included files found matching '*.mp3'
    warning: no previously-included files found matching '.gitignore'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.DS_STORE' found anywhere in distribution
    Installing bandcamp-dl script to /usr/local/bin
Successfully installed bandcamp-downloader
Cleaning up...

However when I ran the version on my fork (https://github.com/PedroLopes/bandcamp-dl) which I don't see what has that could handle that problem, it does work fine:

python bandcamp_dl.py https://gregorylenczycki.bandcamp.com/track/str-qrt-no-one
Starting download process.
Accessing track 1 of 1
```_

Can't seem to run program

After a bit of struggling (mostly due to lxml), I've gotten this installed, but I'm still having trouble using it. I might be running the commands incorrectly, but I've tried quite a few different things. Any ideas? Do I need to add another environment path variable?

`C:\Users\duboi>pip uninstall bandcamp-downloader
Uninstalling bandcamp-downloader-0.0.3:
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl__init__.py
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl__pycache____init__.cpython-35.pyc
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl__pycache__\bandcamp.cpython-35.pyc
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\bandcamp.py
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\bandcamp_dl.py
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\bandcampdownloader.py
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\jsobj.py
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\description.rst
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\entry_points.txt
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\installer
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\metadata
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\metadata.json
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\record
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\top_level.txt
c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_downloader-0.0.3.dist-info\wheel
c:\users\duboi\appdata\local\programs\python\python35-32\scripts\bandcamp-dl.exe
Proceed (y/n)? y
Successfully uninstalled bandcamp-downloader-0.0.3

C:\Users\duboi>pip install bandcamp-downloader
Collecting bandcamp-downloader
Requirement already satisfied (use --upgrade to upgrade): slugify==0.0.1 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): mutagen>=1.31 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): slimit>=0.8.1 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): wgetter>=0.6 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4>=4.4.1 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): ply==3.4 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): lxml>=3.5.0 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Requirement already satisfied (use --upgrade to upgrade): docopt>=0.6.2 in c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages (from bandcamp-downloader)
Installing collected packages: bandcamp-downloader
Successfully installed bandcamp-downloader-0.0.3

C:\Users\duboi>bandcamp-dl.py (--help)
'bandcamp-dl.py' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\duboi>bandcamp-dl (--help)
Traceback (most recent call last):
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\runpy.py", line 170, in run_module_as_main
"main", mod_spec)
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\duboi\AppData\Local\Programs\Python\Python35-32\Scripts\bandcamp-dl.exe__main
.py", line 5, in
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\bandcamp_dl.py", line 59
print "The url {} is not a valid bandcamp page.".format(url)
^
SyntaxError: invalid syntax

C:\Users\duboi>bandcamp-dl --help
Traceback (most recent call last):
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\runpy.py", line 170, in run_module_as_main
"main", mod_spec)
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\duboi\AppData\Local\Programs\Python\Python35-32\Scripts\bandcamp-dl.exe__main
.py", line 5, in
File "c:\users\duboi\appdata\local\programs\python\python35-32\lib\site-packages\bandcamp_dl\bandcamp_dl.py", line 59
print "The url {} is not a valid bandcamp page.".format(url)
^
SyntaxError: invalid syntax

C:\Users\duboi>bandcamp-dl.py --help
'bandcamp-dl.py' is not recognized as an internal or external command,
operable program or batch file.`

Syntax issues

Hmm.

I feel like an idiot right now.

I've been trying to understand the syntax, i'm used to bash and command-line python, i'm a big user of scdl, but i don't get this one.
Here's the command :

bandcamp-dl --full-album "https://rosswhyte.bandcamp.com/album/kaidan" --verbose

Here's the error output :

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/bin/bandcamp-dl", line 9, in
load_entry_point('bandcamp-downloader==0.0.3', 'console_scripts', 'bandcamp-dl')()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/init.py", line 542, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/init.py", line 2569, in load_entry_point
return ep.load()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/init.py", line 2229, in load
return self.resolve()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pkg_resources/init.py", line 2235, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/bandcamp_dl/bandcamp_dl.py", line 59
print "The url {} is not a valid bandcamp page.".format(url)
^
SyntaxError: invalid syntax

Unicode error

I'm consistently getting errors as in the following example:

Starting the parsing for: http://spark.bandcamp.com/album/eedl-parallemped-ep Traceback (most recent call last): File "bandcamp-dl.py", line 200, in <module> parse_file(url) File "bandcamp-dl.py", line 80, in parse_file stringBlock = jsobj.read_js_object("var TralbumData = %s" % str(stringBlock)) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 416: ordinal not in range(128)

Lyrics in tags

How about downloading lyrics stright into the mp3 tag?
I think this could be interesting for really a lot of people

Thank you very much!

download fails?

C:\Users\User\Desktop\bandcamp-dl-master\bandcamp-dl>bandcamp-dl.py https://hot
flashheatwave.bandcamp.com/album/neapolitan
unknown url type: //popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=09bd9
d2a0c4b1777c8048cf4d5d27b16&id=2769757913&stream=1&ts=1444516310.0
Downloading failed..

Add Note on Recloning

Since I had to clean the repo, it's best to reclone it to make sure that old ditty code doesn't pollute it.

To-Do

Potential integration with a back-end, perhaps Flask or something of the sort

Couldn't write lextab module <module 'slimit.lextab' from '/usr/local/lib/python2.7/dist-packages/slimit/lextab.pyc'>

WARNING: Couldn't write lextab module <module 'slimit.lextab' from '/usr/local/lib/python2.7/dist-packages/slimit/lextab.pyc'>. Won't overwrite existing lextab module.

WARNING: yacc table file version is out of date
WARNING: Token 'IMPORT' defined, but not used
WARNING: Token 'BLOCK_COMMENT' defined, but not used
WARNING: Token 'ENUM' defined, but not used
WARNING: Token 'EXTENDS' defined, but not used
WARNING: Token 'LINE_COMMENT' defined, but not used
WARNING: Token 'LINE_TERMINATOR' defined, but not used
WARNING: Token 'CONST' defined, but not used
WARNING: Token 'EXPORT' defined, but not used
WARNING: Token 'CLASS' defined, but not used
WARNING: Token 'SUPER' defined, but not used
WARNING: There are 10 unused tokens

unable to run sample code given in readme

File "C:\Python34\lib\site-packages\slimit\minifier.py", line 38, in minify
tree = parser.parse(text)
File "C:\Python34\lib\site-packages\slimit\parser.py", line 93, in parse
return self.parser.parse(text, lexer=self.lexer, debug=debug)
File "C:\Python34\lib\site-packages\ply\yacc.py", line 265, in parse
return self.parseopt_notrack(input,lexer,debug,tracking,tokenfunc)
File "C:\Python34\lib\site-packages\ply\yacc.py", line 1047, in parseopt_notrack
tok = self.errorfunc(errtoken)
File "C:\Python34\lib\site-packages\slimit\parser.py", line 116, in p_error
self._raise_syntax_error(token)
File "C:\Python34\lib\site-packages\slimit\parser.py", line 89, in _raise_syntax_error
self.lexer.prev_token, self.lexer.token())
SyntaxError: Unexpected token (SEMI, ';') at 1:120 between LexToken(LINE_TERMINATOR,'\n',1,118) and LexToken(RBRACE,'}',1,120)

problems installing bandcamp-dl on windows

i run the command pip install bandcamp-downloader and got this:
http://pastebin.com/wDNjBYWf

it seems like i have to install libxml2 and libxslt, but I'm not sure how. i dropped the required files inside directory inside %PATH%, but I still get the same error (apparently, xslt-config isn't included in the windows release of libxslt)

also, why is the installer calling a c compiler?

Error downloading single track. KeyError: 'album_title'

C:\>bandcamp-dl https://yunggemmy.bandcamp.com/track/cutest-in-the-game
Traceback (most recent call last):
  File "C:\Python27\Scripts\bandcamp-dl-script.py", line 9, in <module>
    load_entry_point('bandcamp-downloader==0.0.3', 'console_scripts', 'bandcamp-dl')()
  File "C:\Python27\lib\site-packages\bandcamp_dl\bandcamp_dl.py", line 55, in main
    album = bandcamp.parse(url)
  File "C:\Python27\lib\site-packages\bandcamp_dl\Bandcamp.py", line 28, in parse
    album_meta = self.extract_album_meta_data(r)
  File "C:\Python27\lib\site-packages\bandcamp_dl\Bandcamp.py", line 76, in extract_album_meta_data
    album['title'] = embedData['EmbedData']['album_title']
KeyError: 'album_title'

i read the instructions for submitting an issue but there was no --verbose argument available and -v only displayed the version.

im guessing its failing because im trying to download a track, not an album? this track doesnt belong to any album

Windows 7 x64
Python 2.7.10
EDIT: was using bandcamp-dl version from pip

Add tests

We have been needing this, its a bit silly that testing has been done manually.

I'll get together a nice group of urls with different album sizes, languages, etc and put together some tests with pytest.

Not sure if tests for individual tracks should be put in yet as currently it only works by coincidence, there is no actual code for handling individual tracks and they are downloaded as if they were albums.

Embed Lyrics Redux

For some reason even with all lyric grabbing and embedding code disabled lyrics are still embedded somehow.

It must somehow be embedded to begin with but I was under the impression the mp3's where metadata bare to start with?

If they are embedded to begin with what was the point of the original PR?

I was getting strange cases of duplicated lyrics tags (Lyrics and Lyrics [None] in Picard) and so I'm guessing the tag was there to begin with.

Its possible that some artists release theirs with the lyrics properly embedded and some don't and that was the reasoning but as it stands not checking if the lyrics are embedded already before doing so is a big no no.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.