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

Extract Bandcamp track images more efficiently #765

Open
kellnerd opened this issue May 23, 2024 · 0 comments
Open

Extract Bandcamp track images more efficiently #765

kellnerd opened this issue May 23, 2024 · 0 comments

Comments

@kellnerd
Copy link
Collaborator

Instead of extracting each image from the HTML page of its track (one additional request per track), they can also be extracted from the embedded player (one additional request in total).
This approach even works for pre-releases where the files have already been uploaded although the track pages themselves are not even accessible before the release.

An embedded player can be fetched from https://bandcamp.com/EmbeddedPlayer/album=${albumId}, where albumId is the numeric internal ID from the tralbum JSON.
The interesting JSON data is embedded into a player-data data attribute on that HTML page.

Example: https://chillhop.bandcamp.com/album/chillhop-essentials-summer-2024 -> https://bandcamp.com/EmbeddedPlayer/album=3871800458

Unfortunately the embedded player JSON data includes a lot of bloat about any(?) merch offered by that artist/label for whatever reason, but this is still more efficient than downloading the HTML of each track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant