Skip to content

Instantly share code, notes, and snippets.

@okkdev
Last active February 23, 2024 20:03
Show Gist options
  • Save okkdev/4a33e9b367ebf1ce7d302c1f82876ade to your computer and use it in GitHub Desktop.
Save okkdev/4a33e9b367ebf1ce7d302c1f82876ade to your computer and use it in GitHub Desktop.
Run this script in the browser console of a cardmarket wantlist to export the list as decklist with this format: AMOUNTx CARDNAME (EXPANSION)
console.log([...document.querySelectorAll('#WantsListTable>table>tbody>tr')].map(x => [x.querySelector('.amount').innerText+'x', x.querySelector('.name').innerText, '('+x.querySelector('.expansion>div>span>span').innerText+')'].join(' ')).join('\n'))
@okkdev
Copy link
Author

okkdev commented Feb 23, 2023

without expansion:

console.log([...document.querySelectorAll('#WantsListTable>table>tbody>tr')].map(x => [x.querySelector('.amount').innerText+'x', x.querySelector('.name').innerText].join(' ')).join('\n'))

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