From 8522ad7d4a605ef9798191026cd5eb922953c332 Mon Sep 17 00:00:00 2001 From: MikeZeDev Date: Sat, 30 Nov 2024 14:20:41 +0100 Subject: [PATCH] ComicExtra : reflect website changes https://github.com/manga-download/hakuneko/issues/7575 --- web/src/engine/websites/ComicExtra.ts | 25 ++++++++--------------- web/src/engine/websites/ComicExtra_e2e.ts | 4 ++-- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/web/src/engine/websites/ComicExtra.ts b/web/src/engine/websites/ComicExtra.ts index b2765a05ae..719e71d67f 100644 --- a/web/src/engine/websites/ComicExtra.ts +++ b/web/src/engine/websites/ComicExtra.ts @@ -1,34 +1,27 @@ import { Tags } from '../Tags'; import icon from './ComicExtra.webp'; -import { DecoratableMangaScraper, type Manga, type MangaPlugin } from '../providers/MangaPlugin'; +import { DecoratableMangaScraper } from '../providers/MangaPlugin'; import * as Common from './decorators/Common'; function ChapterExtractor(anchor: HTMLAnchorElement) { - const id = anchor.pathname + '/full'; - const title = anchor.text.trim(); - return { id, title }; + return { + id: anchor.pathname + '/full', + title: anchor.text.trim() + }; } -@Common.MangaCSS(/^{origin}\/comic\/[^/]+$/, '.title-1') -@Common.ChaptersSinglePageCSS('#list tr td a', ChapterExtractor) +@Common.MangaCSS(/^{origin}\/comic\/[^/]+$/, 'div.anime-top h1.title') +@Common.MangasMultiPageCSS('/comic-list?c=&page={page}', 'ul.line-list li a', 1, 1, 0) +@Common.ChaptersSinglePageCSS('ul.basic-list li a', ChapterExtractor) @Common.PagesSinglePageCSS('div.chapter-container img') @Common.ImageAjax() export default class extends DecoratableMangaScraper { public constructor() { - super('comicextra', `ComicExtra`, 'https://comixextra.com', Tags.Language.English, Tags.Media.Comic, Tags.Source.Aggregator); + super('comicextra', `ComicExtra`, 'https://azcomix.me', Tags.Language.English, Tags.Media.Comic, Tags.Source.Aggregator); } public override get Icon() { return icon; } - - public override async FetchMangas(provider: MangaPlugin) : Promise{ - const mangalist : Manga[] = []; - const paths = ['others'].concat('abcdefghijklmnopqrstuvwxyz'.split('')); - for (const letter of paths) { - mangalist.push(... await Common.FetchMangasSinglePageCSS.call(this, provider, '/comic-list/' + letter, '.home-list .hl-box .hlb-t a')); - } - return mangalist; - } } \ No newline at end of file diff --git a/web/src/engine/websites/ComicExtra_e2e.ts b/web/src/engine/websites/ComicExtra_e2e.ts index c0d1aa613b..65914feb99 100644 --- a/web/src/engine/websites/ComicExtra_e2e.ts +++ b/web/src/engine/websites/ComicExtra_e2e.ts @@ -6,13 +6,13 @@ const config: Config = { title: 'ComicExtra' }, container: { - url: 'https://comixextra.com/comic/grimm-fairy-tales-2016', + url: 'https://azcomix.me/comic/grimm-fairy-tales-2016', id: '/comic/grimm-fairy-tales-2016', title: 'Grimm Fairy Tales (2016)' }, child: { id: '/grimm-fairy-tales-2016/issue-2023-swimsuit-special/full', - title: '#2023 Swimsuit Special' + title: 'Issue #2023 Swimsuit Special' }, entry: { index: 0,