Skip to content

Commit

Permalink
ComicExtra : reflect website changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev committed Nov 30, 2024
1 parent 6e57ef2 commit 8522ad7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
25 changes: 9 additions & 16 deletions web/src/engine/websites/ComicExtra.ts
Original file line number Diff line number Diff line change
@@ -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<Manga[]>{
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;
}
}
4 changes: 2 additions & 2 deletions web/src/engine/websites/ComicExtra_e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8522ad7

Please sign in to comment.