diff --git a/web/src/engine/websites/VortexScans.ts b/web/src/engine/websites/VortexScans.ts index b87234fe0a..f4b48d6adc 100644 --- a/web/src/engine/websites/VortexScans.ts +++ b/web/src/engine/websites/VortexScans.ts @@ -1,7 +1,7 @@ import { Tags } from '../Tags'; -import { FetchHTML } from '../platform/FetchProvider'; -import { Page, type Chapter } from '../providers/MangaPlugin'; import icon from './VortexScans.webp'; +import { FetchRegex } from '../platform/FetchProvider'; +import { Page, type Chapter } from '../providers/MangaPlugin'; import { VTheme } from './templates/VTheme'; type JSONImage = { @@ -19,8 +19,8 @@ export default class extends VTheme { } public override async FetchPages(chapter: Chapter): Promise { - const doc = await FetchHTML(new Request(new URL(chapter.Identifier, this.URI))); - const images: JSONImage[] = JSON.parse(doc.documentElement.innerHTML.match(/\\"images\\":(\[.*]),\\"nextChapter/)[1].replaceAll('\\', '')); + const [ data ] = await FetchRegex(new Request(new URL(chapter.Identifier, this.URI)), /\\"images\\":(\[.*]),\\"nextChapter/g); + const images: JSONImage[] = JSON.parse(data.replaceAll('\\', '')); return images.map(image => new Page(this, chapter, new URL(image.url), { Referer: this.URI.href })); } -} +} \ No newline at end of file diff --git a/web/src/engine/websites/templates/VTheme.ts b/web/src/engine/websites/templates/VTheme.ts index 46ea75e9e4..19377784db 100644 --- a/web/src/engine/websites/templates/VTheme.ts +++ b/web/src/engine/websites/templates/VTheme.ts @@ -1,4 +1,4 @@ -//VTheme theme by V DEV : https://discord.com/invite/yz3UN72qPd +// VTheme theme by V DEV : https://discord.com/invite/yz3UN72qPd import { FetchJSON } from '../../platform/FetchProvider'; import { Chapter, DecoratableMangaScraper, type MangaPlugin, Manga } from '../../providers/MangaPlugin';