Skip to content

Instantly share code, notes, and snippets.

@BjoernRave
Last active February 15, 2026 23:21
Show Gist options
  • Select an option

  • Save BjoernRave/0a9a6e1168ca5956cda345cd76fb6518 to your computer and use it in GitHub Desktop.

Select an option

Save BjoernRave/0a9a6e1168ca5956cda345cd76fb6518 to your computer and use it in GitHub Desktop.
Function to get a decklist of a cardmarket wanted list. Just go to your wanted list, right click somewhere, click inspect, go to console, paste this in and hit enter
(function scrapeData() {
const tbody = document.querySelector('tbody');
const trElements = tbody.querySelectorAll('tr');
const result = [];
trElements.forEach((tr) => {
const amountElement = tr.querySelector('.amount');
const nameElement = tr.querySelector('.name');
if (amountElement && nameElement) {
result.push(`${amountElement.textContent.trim()} ${nameElement.textContent.trim()}`);
}
});
return result.join('\n');
})()
@pmbittner
Copy link

Worked like a charm! :)

@MeisterDerMagie
Copy link

Thank you!
This also works on the shipment page.
For cards in a non-english language, replace '.name' with '.name .fst-italic' to only get the english names.

grafik

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