Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double quote characters turn entire playlist name into "\" [bandcamp:album] #10455

Closed
bryc opened this issue Aug 28, 2016 · 2 comments
Closed

Comments

@bryc
Copy link

bryc commented Aug 28, 2016

This occurs when attempting to download an album on Bandcamp with names such as "Entropy" EP that contain quotes. I'd expect an output folder name such as Entropy EP or Entropy EP, however for some reason it gives only \ instead, is substituted as _ when written as a folder.

Using this command line:
youtube-dl -v -a urls.txt -i -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"

[Bandcamp:album] entropy-ep: Downloading webpage
[download] Downloading playlist: \
[Bandcamp:album] playlist \: Collected 3 video ids (downloading 3 of them)
[download] Downloading video 1 of 3
[Bandcamp] entropy: Downloading webpage
[debug] Invoking downloader on 'http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=a3f285d778873f2f74921589a40c209d&id=1317106790&stream=1&ts=1472354346.0'
[download] _\1 - Entropy.mp3 has already been downloaded
[download] 100% of 2.74MiB
[download] Downloading video 2 of 3
[Bandcamp] entropy-roughmath-remix: Downloading webpage
[debug] Invoking downloader on 'http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=623cbb6b90d0f5935c3825026f0f6e6f&id=507884965&stream=1&ts=1472354353.0'
[download] _\2 - Entropy (RoughMath Remix).mp3 has already been downloaded
[download] 100% of 5.11MiB
[download] Downloading video 3 of 3
[Bandcamp] entropy-aaronic-remix: Downloading webpage
[debug] Invoking downloader on 'http://popplers5.bandcamp.com/download/track?enc=mp3-128&fsig=228f38eecf6c54ce81db0b3bb774d798&id=2350421365&stream=1&ts=1472354365.0'
[download] _\3 - Entropy (Aaronic Remix).mp3 has already been downloaded
[download] 100% of 4.75MiB
[download] Finished downloading playlist: \

It creates a folder called "_" from the "" character, and puts all downloaded files there, so any affected album names will end up there. However on the very first line of the output, it gets it right: "[Bandcamp:album] entropy-ep" Why isn't it using that?

URL to the album is here: https://jstrecords.bandcamp.com/album/entropy-ep

@PedroLopes
Copy link

I had the same issue, hence here's one possible fix:
webpage = webpage.replace('\\"', "") (added to the file youtube_dl/extractor/bandcamp.py)

Note: possibly this could be done right before any extraction is performed on the webpage.

Cause of the problem is the \" on the extracted webpage (see below)
webpage

... makes the regex exit immediately (see below)
regexfail

Alternative Fix: use the regex itself to jump the quotes

Details:
Tested in Mac OSX
Last pull from git (as of Tue Aug 30 02:56:46 CEST 2016)

Cloned into: https://github.com/PedroLopes/youtube-dl

P.s.: @bryc I think your text command should have quotes too (at least I needed those to replicate your issue), hence:
youtube-dl -v -a urls.txt -i -o "%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"

@PedroLopes
Copy link

p.s.: added a pull request for such (#10495)

@dstftw dstftw closed this as completed in 64fc49a Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants