Last active
December 1, 2025 16:49
-
-
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
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
| 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