Skip to content

Instantly share code, notes, and snippets.

@vincerubinetti
Last active December 3, 2025 18:02
Show Gist options
  • Select an option

  • Save vincerubinetti/51c0cf8b9662c2d5b61ede5bef04d3e3 to your computer and use it in GitHub Desktop.

Select an option

Save vincerubinetti/51c0cf8b9662c2d5b61ede5bef04d3e3 to your computer and use it in GitHub Desktop.
Run in dev console on Bandcamp album edit page to get metadata
const sel = (selector, base = document) => base.querySelectorAll(selector);
const get = (selector, base) => {
elements = sel(selector, base);
element = elements[0] || {};
return element.value || element.innerText || "";
};
const title = get("[name='album.title']");
const date = get("[name='album.release_date']");
const about = get("[name='album.about']");
const credits = get("[name='album.credits']");
const rows = sel("li.track");
const tracks = [];
for (const row of rows) {
const title = get("[name*='track.title']", row);
const about = get("[name*='track.about']", row);
const lyrics = get("[name*='track.lyrics']", row);
const credits = get("[name*='track.credits']", row);
tracks.push({ title, about, lyrics, credits });
}
console.log(tracks);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment