Compare commits

..

No commits in common. "64b693e1e5682b782f7c367aef38d4d8581d1d74" and "3f374303a4481e5a749a3845c03f0e0d8286a091" have entirely different histories.

1 changed files with 5 additions and 15 deletions

View File

@ -14,8 +14,8 @@ async function getPatchHrefs() {
const hrefRequests = [...Array(7).keys()]
.map((val) => ++val)
.map((page) =>
(async () => {
.map((page) => {
return (async () => {
const req = await fetch(getGalleryPageHref(page));
const data = parse(await req.text());
@ -28,8 +28,8 @@ async function getPatchHrefs() {
?.getElementsByTagName("a")
.map((el) => el.getAttribute("href"))
.filter((el) => el) as string[];
})(),
);
})();
});
const hrefLists = await Promise.all(hrefRequests);
@ -38,14 +38,4 @@ async function getPatchHrefs() {
const allPatches = await getPatchHrefs();
const patchRequests = allPatches.map((testPatchUrl) =>
(async () => {
const req = await fetch(testPatchUrl);
const data = parse(await req.text());
return data.getElementsByTagName("h1")[0].nextElementSibling?.innerText;
})(),
);
const patchDescriptions = await Promise.all(patchRequests);
console.log(patchDescriptions);
console.log(allPatches);