getting all descriptions
This commit is contained in:
parent
814ae312b0
commit
64b693e1e5
1 changed files with 11 additions and 1 deletions
12
index.ts
12
index.ts
|
@ -38,4 +38,14 @@ async function getPatchHrefs() {
|
||||||
|
|
||||||
const allPatches = await getPatchHrefs();
|
const allPatches = await getPatchHrefs();
|
||||||
|
|
||||||
console.log(allPatches);
|
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);
|
||||||
|
|
Loading…
Reference in a new issue