chore: Update URL rewrite logic for runtime

This commit is contained in:
n4ze3m
2024-05-12 23:54:48 +05:30
parent 62ffe8346e
commit e94edf5c89
12 changed files with 88 additions and 27 deletions

View File

@@ -102,7 +102,7 @@ export class PageAssistHtmlLoader
}
]
}
await urlRewriteRuntime(this.url)
await urlRewriteRuntime(this.url, "web")
const fetchHTML = await fetch(this.url)
let html = await fetchHTML.text()
@@ -111,11 +111,6 @@ export class PageAssistHtmlLoader
html = parseWikipedia(await fetchHTML.text())
}
// else if (isTwitter(this.url)) {
// console.log("Twitter URL detected")
// html = parseTweet(await fetchHTML.text(), this.url)
// }
const htmlCompiler = compile({
wordwrap: false,
selectors: [