Created
December 3, 2025 18:02
-
-
Save vincerubinetti/d429520fc6b0acf39cc0ace05341c706 to your computer and use it in GitHub Desktop.
Run in dev console on Bandcamp stats page to get albums and track listings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const data = JSON.parse(document.getElementById("pagedata").dataset.blob); | |
| const user_id = data.identities.user.id; | |
| const band_id = data.identities.page_band.id; | |
| const url = new URL(window.location.origin); | |
| url.searchParams.set("user_id", user_id); | |
| url.searchParams.set("band_id", band_id); | |
| const get = async () => await (await fetch(url)).json(); | |
| url.pathname = "api/mobile/25/band_details"; | |
| const { bandcamp_url, discography } = await get(); | |
| const releases = await Promise.all( | |
| discography.map(async ({ item_id, item_type }) => { | |
| url.pathname = "api/mobile/25/tralbum_details"; | |
| url.searchParams.set("tralbum_id", item_id); | |
| url.searchParams.set("tralbum_type", item_type === "track" ? "t" : "a"); | |
| return await get(); | |
| }) | |
| ); | |
| console.log(releases); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.