-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ComicExtra : reflect website changes
- Loading branch information
Showing
2 changed files
with
11 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters