iheanyi / bandcamp-dl

Simple python script to download Bandcamp albums
The Unlicense
941 stars 104 forks source link

bandcamp-dl 0.0.10 test failure #180

Closed chenrui333 closed 3 years ago

chenrui333 commented 3 years ago

Python version:

python 3.9

Bandcamp-dl version:

0.0.10

Describe the issue:

test failure ``` ==> /usr/local/Cellar/bandcamp-dl/0.0.10/bin/bandcamp-dl --debug --artist=iamsleepless --album=rivulets DEBUG:root: URL: h DEBUG:root: URL: t DEBUG:root: URL: t DEBUG:root: URL: p DEBUG:root: URL: : DEBUG:root: URL: / DEBUG:root: URL: / DEBUG:root: URL: i DEBUG:root: URL: a DEBUG:root: URL: m DEBUG:root: URL: s DEBUG:root: URL: l DEBUG:root: URL: e DEBUG:root: URL: e DEBUG:root: URL: p DEBUG:root: URL: l DEBUG:root: URL: e DEBUG:root: URL: s DEBUG:root: URL: s DEBUG:root: URL: . DEBUG:root: URL: b DEBUG:root: URL: a DEBUG:root: URL: n DEBUG:root: URL: d DEBUG:root: URL: c DEBUG:root: URL: a DEBUG:root: URL: m DEBUG:root: URL: p DEBUG:root: URL: . DEBUG:root: URL: c DEBUG:root: URL: o DEBUG:root: URL: m DEBUG:root: URL: / DEBUG:root: URL: a DEBUG:root: URL: l DEBUG:root: URL: b DEBUG:root: URL: u DEBUG:root: URL: m DEBUG:root: URL: / DEBUG:root: URL: r DEBUG:root: URL: i DEBUG:root: URL: v DEBUG:root: URL: u DEBUG:root: URL: l DEBUG:root: URL: e DEBUG:root: URL: t DEBUG:root: URL: s Traceback (most recent call last): File "/usr/local/Cellar/bandcamp-dl/0.0.10/bin/bandcamp-dl", line 33, in sys.exit(load_entry_point('bandcamp-downloader==0.0.10', 'console_scripts', 'bandcamp-dl')()) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/bandcamp_dl/__main__.py", line 100, in main albumList.append(bandcamp.parse(url, not arguments['--no-art'], arguments['--embed-lyrics'], arguments['--debug'])) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/bandcamp_dl/bandcamp.py", line 30, in parse response = requests.get(url, headers=self.headers) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, **send_kwargs) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/requests/sessions.py", line 649, in send adapter = self.get_adapter(url=request.url) File "/usr/local/Cellar/bandcamp-dl/0.0.10/libexec/lib/python3.9/site-packages/requests/sessions.py", line 742, in get_adapter raise InvalidSchema("No connection adapters were found for {!r}".format(url)) ```

relates to https://github.com/Homebrew/homebrew-core/pull/68734

Evolution0 commented 3 years ago

Seems to be an issue with the url generator when using --artist, --album, etc as a direct url works fine, this sounds like a regression from some other commit relating to urls a while back.

I'll look into it, I already have a rough idea as to what did it: #160 Luckily looks like something I can just roll back and test.

chenrui333 commented 3 years ago

Sounds good

Evolution0 commented 3 years ago

Yep that was the issue, when they added code for handling multiple urls they didn't account for the fact that generate_album_url() returns a str of a single url not a list.

You can grab the dev release wheel here: https://github.com/iheanyi/bandcamp-dl/releases/tag/1.0.0-dev-r1

Just pip install filename.whl

chenrui333 commented 2 years ago

Any plan of making a new release in the near future? I am also waiting for the change in this commit, cf9d43fed2854826189caf11a0e1c45d18117849

chenrui333 commented 2 years ago

my bad, you did make a new release, gonna try it now.

chenrui333 commented 2 years ago

Works great for me with 0.0.12 release, https://github.com/Homebrew/homebrew-core/pull/91874 Thanks @Evolution0!