]> localhost Git - radev.git/commitdiff
Add a browser JS scraper for hub games
authormisomosi <[email protected]>
Wed, 26 Aug 2026 15:24:15 +0000 (11:24 -0400)
committermisomosi <[email protected]>
Wed, 26 Aug 2026 15:24:15 +0000 (11:24 -0400)
EZSets/.gitignore [new file with mode: 0644]
EZSets/FreelyAvailableScraper.js [new file with mode: 0644]

diff --git a/EZSets/.gitignore b/EZSets/.gitignore
new file mode 100644 (file)
index 0000000..a6c57f5
--- /dev/null
@@ -0,0 +1 @@
+*.json
diff --git a/EZSets/FreelyAvailableScraper.js b/EZSets/FreelyAvailableScraper.js
new file mode 100644 (file)
index 0000000..49609d4
--- /dev/null
@@ -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