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,12 +12,11 @@ async function getPatchHrefs() {
} }
} }
return ( let patchHrefs: string[] = [];
await Promise.all(
[...Array(7).keys()] [...Array(7).keys()]
.map((val) => ++val) .map((val) => ++val)
.map((page) => { .map(async (page) => {
return (async () => {
const req = await fetch(getGalleryPageHref(page)); const req = await fetch(getGalleryPageHref(page));
const data = parse(await req.text()); const data = parse(await req.text());
@ -30,10 +29,7 @@ async function getPatchHrefs() {
?.getElementsByTagName("a") ?.getElementsByTagName("a")
.map((el) => el.getAttribute("href")) .map((el) => el.getAttribute("href"))
.filter((el) => el) as string[]; .filter((el) => el) as string[];
})(); });
}),
)
).flat();
} }
const allPatches = await getPatchHrefs(); const allPatches = await getPatchHrefs();