Compare commits

..

No commits in common. "91fe0edfcd2e6c9974eed353f74650bcb5143df5" and "f9a5d5cdac6db302e7325086b9f0149d1919daf4" have entirely different histories.

1 changed files with 16 additions and 20 deletions

View File

@ -12,28 +12,24 @@ async function getPatchHrefs() {
} }
} }
return ( let patchHrefs: string[] = [];
await Promise.all(
[...Array(7).keys()]
.map((val) => ++val)
.map((page) => {
return (async () => {
const req = await fetch(getGalleryPageHref(page));
const data = parse(await req.text());
const gallery = data [...Array(7).keys()]
.getElementsByTagName("div") .map((val) => ++val)
.filter((el) => el.classList.contains("hds-gallery-items")) .map(async (page) => {
.shift(); const req = await fetch(getGalleryPageHref(page));
const data = parse(await req.text());
return gallery const gallery = data
?.getElementsByTagName("a") .getElementsByTagName("div")
.map((el) => el.getAttribute("href")) .filter((el) => el.classList.contains("hds-gallery-items"))
.filter((el) => el) as string[]; .shift();
})();
}), return gallery
) ?.getElementsByTagName("a")
).flat(); .map((el) => el.getAttribute("href"))
.filter((el) => el) as string[];
});
} }
const allPatches = await getPatchHrefs(); const allPatches = await getPatchHrefs();