Compare commits
2 Commits
f9a5d5cdac
...
91fe0edfcd
Author | SHA1 | Date |
---|---|---|
Zynh0722 | 91fe0edfcd | |
Zynh0722 | 390b4029b4 |
12
index.ts
12
index.ts
|
@ -12,11 +12,12 @@ async function getPatchHrefs() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let patchHrefs: string[] = [];
|
return (
|
||||||
|
await Promise.all(
|
||||||
[...Array(7).keys()]
|
[...Array(7).keys()]
|
||||||
.map((val) => ++val)
|
.map((val) => ++val)
|
||||||
.map(async (page) => {
|
.map((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());
|
||||||
|
|
||||||
|
@ -29,7 +30,10 @@ 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();
|
||||||
|
|
Loading…
Reference in New Issue