Created
December 14, 2025 01:15
-
-
Save osvalr/10b804ab638d4464d6a2f76b0eb009e0 to your computer and use it in GitHub Desktop.
get all image urls for a collegium album
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
| function deepQueryAll(selector, node = document) { | |
| const out = []; | |
| const walk = (n) => { | |
| out.push(...n.querySelectorAll?.(selector) ?? []); | |
| n.querySelectorAll?.("*")?.forEach(el => el.shadowRoot && walk(el.shadowRoot)); | |
| }; | |
| walk(node); | |
| return out; | |
| } | |
| deepQueryAll("img").map(i => i.src).filter((i) => i.includes("https://goschoolar.s3.amazonaws.com/uploads")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment