Added title casing

This commit is contained in:
Lukas Wölfer
2025-06-05 23:01:25 +02:00
parent 76bc73ba97
commit 1fd15470f8
5 changed files with 85 additions and 18 deletions

View File

@@ -37,9 +37,11 @@ async function fetchPages(pages: string[], bot: Mwn): Promise<VideoDescription[]
parseSummary(await new bot.Page(v).text(), v)
))
d.map((v, index) => ({ r: v, source: pages[index] })).filter((v): v is { source: string, r: PromiseRejectedResult } => v.r.status === "rejected").forEach(
v => console.warn(`Error parsing ${v.source}: ${v.r.reason}`
))
d.map((v, index) => ({ r: v, source: pages[index] }))
.filter((v): v is { source: string, r: PromiseRejectedResult } => v.r.status === "rejected")
.forEach(
v => console.warn(`Error parsing ${v.source}: ${v.r.reason}`
))
return d.filter(v => v.status === "fulfilled").map(v => v.value)