Skip to content

Instantly share code, notes, and snippets.

@ProdigySim
Last active December 1, 2025 16:49
Show Gist options
  • Select an option

  • Save ProdigySim/60782d4bed7fa245ee33706d368eeb6b to your computer and use it in GitHub Desktop.

Select an option

Save ProdigySim/60782d4bed7fa245ee33706d368eeb6b to your computer and use it in GitHub Desktop.
Run this snippet in browser console to get Set subsection metadata from scryfall set pages
Array.from(document.querySelectorAll(".card-grid-header-content"))
.map((h, idx) => {
const title = Array.from(h.childNodes)
.find(n => n.nodeType === Node.TEXT_NODE)
?.textContent.trim();
const searchLink = h.querySelector('a')?.getAttribute("href");
const query = new URLSearchParams(searchLink?.split('?')[1]).get('q');
return {title, query}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment