Allow Bandcamp to parse and download all albums #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
First of all, thanks in advance for this great tool. 😄
I'm really happy with all the work you and others have put into this and I hope my commits may be helpful.
Before going any further, it is worth mentioning how some special Bandcamp pages seem to work:
The main URL (....bandcamp.com) usually mirrors one of those.
Here's an example where /releases is mirrored: https://mothermooch.bandcamp.com/
Here's an example where /music is mirrored: https://mississippibones.bandcamp.com/
(examples checked as of 2015/October/31 - may differ in the future)
(I can't find any examples right now, but I'm 100% sure some bands choose to mirror /merch)
While testing SoundScraper, I couldn't download all albums from a certain band.
This band's main URL was mirroring /music, so it couldn't be parsed correctly.
SoundScraper would also fail for any artists mirroring /merch, for obvious reasons.
So, these are my main proposed additions with this Pull Request:
[1] The /music page is now accessed when only the artist's username is provided
[2] The /music page is now parsed, recursively calling the relevant method for each album URL
This only introduces a small bug: the limit of tracks is applied for each album separately.
It's like "num_tracks" actually means "num_tracks_per_album".
(if num_tracks=2 and the band has 5 albums, you're going to download 10 tracks)
I'm sure it's an easy fix, but I didn't have time to give it a closer look. 😐
I'm kinda busy and had to use the browser editor to commit my changes, so I may have messed up the indentation. Sorry. 😑
Best regards,
Antonio