Compare commits
No commits in common. "64b693e1e5682b782f7c367aef38d4d8581d1d74" and "3f374303a4481e5a749a3845c03f0e0d8286a091" have entirely different histories.
64b693e1e5
...
3f374303a4
20
index.ts
20
index.ts
|
@ -14,8 +14,8 @@ async function getPatchHrefs() {
|
||||||
|
|
||||||
const hrefRequests = [...Array(7).keys()]
|
const hrefRequests = [...Array(7).keys()]
|
||||||
.map((val) => ++val)
|
.map((val) => ++val)
|
||||||
.map((page) =>
|
.map((page) => {
|
||||||
(async () => {
|
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());
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ 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[];
|
||||||
})(),
|
})();
|
||||||
);
|
});
|
||||||
|
|
||||||
const hrefLists = await Promise.all(hrefRequests);
|
const hrefLists = await Promise.all(hrefRequests);
|
||||||
|
|
||||||
|
@ -38,14 +38,4 @@ async function getPatchHrefs() {
|
||||||
|
|
||||||
const allPatches = await getPatchHrefs();
|
const allPatches = await getPatchHrefs();
|
||||||
|
|
||||||
const patchRequests = allPatches.map((testPatchUrl) =>
|
console.log(allPatches);
|
||||||
(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);
|
|
||||||
|
|
Loading…
Reference in New Issue