From: misomosi Date: Wed, 26 Aug 2026 15:24:15 +0000 (-0400) Subject: Add a browser JS scraper for hub games X-Git-Url: http://git.misomosispi.com/?a=commitdiff_plain;h=fd610702259c23b1dbc6fd63489d1725da9bdfb3;p=radev.git Add a browser JS scraper for hub games --- diff --git a/EZSets/.gitignore b/EZSets/.gitignore new file mode 100644 index 0000000..a6c57f5 --- /dev/null +++ b/EZSets/.gitignore @@ -0,0 +1 @@ +*.json diff --git a/EZSets/FreelyAvailableScraper.js b/EZSets/FreelyAvailableScraper.js new file mode 100644 index 0000000..49609d4 --- /dev/null +++ b/EZSets/FreelyAvailableScraper.js @@ -0,0 +1,11 @@ +// Initialize games as an empty set initially, i.e. games = new Set(); +// Then run this script over and over again in https://retroachievements.org/hub/22750 (Freely Available in ForumTopic) +// Make sure to also set the pagination to max so you don't have to run this a lot (max was 200 at the time of writing) +pageGames = new Set( + Array + .from(document.querySelectorAll('tbody tr td a[href^="https://retroachievements.org/game/"]')) + .map(e => e.href), +); +next = document.querySelector('button[aria-label^="Go to next page"]'); +next.click(); +games = new Set([...games, ...pageGames]); \ No newline at end of file