From 15c986521ffb7db4e0e6b541f98cb4b0b7d2a649 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sun, 25 Jun 2023 12:16:09 +0200 Subject: [PATCH] LegacyScans: change to Mangastream (#5944) * LegacyScans: change to Mangastream They temporarily rebranded to flamescans.fr but are now back with flamescans mangastream theme. * LegacyScans: remove this.queryMangas * LegacyScans: add referer --- src/web/mjs/connectors/LegacyScans.mjs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/web/mjs/connectors/LegacyScans.mjs b/src/web/mjs/connectors/LegacyScans.mjs index ff278eed31..e8f0a22efe 100644 --- a/src/web/mjs/connectors/LegacyScans.mjs +++ b/src/web/mjs/connectors/LegacyScans.mjs @@ -1,6 +1,6 @@ -import WordPressMadara from './templates/WordPressMadara.mjs'; +import WordPressMangastream from './templates/WordPressMangastream.mjs'; -export default class LegacyScans extends WordPressMadara { +export default class LegacyScans extends WordPressMangastream { constructor() { super(); @@ -8,5 +8,13 @@ export default class LegacyScans extends WordPressMadara { super.label = 'Legacy-Scans'; this.tags = ['webtoon', 'french']; this.url = 'https://legacy-scans.com'; + this.path = '/manga/list-mode/'; + this.requestOptions.headers.set('x-referer', this.url); + + this.queryChapters = 'div#chapterlist ul li a'; + } + + async _getPages(chapter) { + return (await super._getPages(chapter)).map(page => this.createConnectorURI(page)); } }