Skip to content

Commit

Permalink
reflect Common changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev committed Dec 15, 2024
1 parent 17f33c4 commit fe4f586
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions web/src/engine/websites/KLManga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ function GenerateRandomEndPoint(length: number, suffix: string): string {
}

@Common.MangaCSS(/^{origin}\/[^/]+\.html$/, FlatManga.queryMangaTitle, FlatManga.MangaLabelExtractor)
@Common.MangasSinglePageCSS(FlatManga.pathSinglePageManga, FlatManga.queryMangas, FlatManga.MangaExtractor)
@Common.MangasSinglePagesCSS([FlatManga.pathSinglePageManga], FlatManga.queryMangas, FlatManga.MangaExtractor)
@FlatManga.ChaptersSinglePageAJAX(GenerateRandomEndPoint(25, '.lstc?slug='), 'dataL', 'a.chapter[title]')
@FlatManga.PagesSinglePageAJAX(GenerateRandomEndPoint(30, '.iog?cid='), 'img.chapter-img[alt*="Page"]', [/olimposcan/] )
@FlatManga.PagesSinglePageAJAX(GenerateRandomEndPoint(30, '.iog?cid='), 'img.chapter-img[alt*="Page"]', [/olimposcan/])
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {

Expand Down
2 changes: 1 addition & 1 deletion web/src/engine/websites/MangaTR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class extends DecoratableMangaScraper {
}

public override async FetchMangas(provider: MangaPlugin): Promise<Manga[]> {
return (await Common.FetchMangasSinglePageCSS.call(this, provider, '/manga-list.html', FlatManga.queryMangas)).filter(manga => manga.Title);
return (await Common.FetchMangasSinglePagesCSS.call(this, provider, ['/manga-list.html'], FlatManga.queryMangas)).filter(manga => manga.Title);
}

public override async FetchChapters(manga: Manga): Promise<Chapter[]> {
Expand Down
12 changes: 8 additions & 4 deletions web/src/engine/websites/_index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export { default as Kiryuu } from './Kiryuu';
export { default as KissmangaIN } from './KissmangaIN';
export { default as KissmangaORG } from './KissmangaORG';
export { default as KlikManga } from './KlikManga';
export { default as KLManga } from './KLManga';
export { default as KnightNoFansub } from './KnightNoFansub';
export { default as KolNovel } from './KolNovel';
export { default as KomBatch } from './KomBatch';
Expand Down Expand Up @@ -321,6 +322,7 @@ export { default as MangaGeko } from './MangaGeko';
export { default as MangaGezgini } from './MangaGezgini';
export { default as MangaGG } from './MangaGG';
export { default as MangaGo } from './MangaGo';
export { default as MangaGun } from './MangaGun';
export { default as MangaHack } from './MangaHack';
export { default as MangaHasu } from './MangaHasu';
export { default as MangaHentai } from './MangaHentai';
Expand Down Expand Up @@ -392,6 +394,7 @@ export { default as MangaTepesi } from './MangaTepesi';
export { default as MangaTilkisi } from './MangaTilkisi';
export { default as MangaTitan } from './MangaTitan';
export { default as MangaTown } from './MangaTown';
export { default as MangaTR } from './MangaTR';
export { default as MangaTRNet } from './MangaTRNet';
export { default as MangaTube } from './MangaTube';
export { default as MangaUpGlobal } from './MangaUpGlobal';
Expand Down Expand Up @@ -478,6 +481,7 @@ export { default as Ngomik } from './Ngomik';
export { default as NHentai } from './NHentai';
export { default as NHentaiCom } from './NHentaiCom';
export { default as NiceOppai } from './NiceOppai';
export { default as NicoManga } from './NicoManga';
export { default as NicoNicoSeiga } from './NicoNicoSeiga';
export { default as Nightow } from './Nightow';
export { default as NightScans } from './NightScans';
Expand All @@ -490,6 +494,7 @@ export { default as NoraNoFansub } from './NoraNoFansub';
export { default as Noromax } from './Noromax';
export { default as NovelMic } from './NovelMic';
export { default as NoxScans } from './NoxScans';
export { default as OlimpoScans } from './OlimpoScans';
export { default as OlympusScanlation } from './OlympusScanlation';
export { default as Opiatoon } from './Opiatoon';
export { default as Oremanga } from './Oremanga';
Expand Down Expand Up @@ -530,6 +535,7 @@ export { default as RavenSeries } from './RavenSeries';
export { default as RavensScansEN } from './RavensScansEN';
export { default as RavensScansES } from './RavensScansES';
export { default as RawDevart } from './RawDevart';
export { default as RawInu } from './RawInu';
export { default as Rawkuma } from './Rawkuma';
export { default as RawLazy } from './RawLazy';
export { default as RawMangaSU } from './RawMangaSU';
Expand Down Expand Up @@ -698,6 +704,8 @@ export { default as WebtoonTRNET } from './WebtoonTRNET';
export { default as WebtoonXYZ } from './WebtoonXYZ';
export { default as WeebCentral } from './WeebCentral';
export { default as WeiboManhua } from './WeiboManhua';
export { default as WeLoMa } from './WeLoMa';
export { default as WeLoveManga } from './WeLoveManga';
export { default as WestManga } from './WestManga';
export { default as WinterScan } from './WinterScan';
export { default as Wnacg } from './Wnacg';
Expand Down Expand Up @@ -750,7 +758,6 @@ export { default as Guoman8 } from './legacy/Guoman8';
export { default as HeavenManga } from './legacy/HeavenManga';
export { default as HolyManga } from './legacy/HolyManga';
export { default as KanMan } from './legacy/KanMan';
export { default as KissAway } from './legacy/KissAway';
export { default as kuman5 } from './legacy/kuman5';
export { default as LectorManga } from './legacy/LectorManga';
export { default as LezhinEN } from './legacy/LezhinEN';
Expand All @@ -772,7 +779,6 @@ export { default as MangaToonES } from './legacy/MangaToonES';
export { default as MangaToonID } from './legacy/MangaToonID';
export { default as MangaToonTH } from './legacy/MangaToonTH';
export { default as MangaToonVI } from './legacy/MangaToonVI';
export { default as MangaTR } from './legacy/MangaTR';
export { default as MangaZukiRAWS } from './legacy/MangaZukiRAWS';
export { default as ManhuaTai } from './legacy/ManhuaTai';
export { default as MeioNovel } from './legacy/MeioNovel';
Expand Down Expand Up @@ -826,8 +832,6 @@ export { default as VizShonenJump } from './legacy/VizShonenJump';
export { default as WanPaMan } from './legacy/WanPaMan';
export { default as WBNovel } from './legacy/WBNovel';
export { default as WebComicGamma } from './legacy/WebComicGamma';
export { default as WeLoMa } from './legacy/WeLoMa';
export { default as WeLoveManga } from './legacy/WeLoveManga';
export { default as WoopRead } from './legacy/WoopRead';
export { default as WordExcerpt } from './legacy/WordExcerpt';
export { default as WordRain } from './legacy/WordRain';
Expand Down
4 changes: 2 additions & 2 deletions web/src/engine/websites/decorators/FlatManga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export async function FetchChaptersSinglePageAJAX(this: MangaScraper, manga: Man
'Referer': this.URI.origin
}
});
const mangaRegexp = new RegExpSafe(`var ${mangaIdVariable}\\s*=\\s*['"]([^'"]+)['"]`);
const mangaSlug = (await FetchHTML(request)).documentElement.innerHTML.match(mangaRegexp)[1];
const mangaRegexp = new RegExp(`var ${mangaIdVariable}\\s*=\\s*['"]([^'"]+)['"]`);
const mangaSlug = (await FetchHTML(request)).documentElement.innerHTML.match(mangaRegexp).at(1);
const apiUrl = new URL(`${endpoint}${mangaSlug}`, this.URI);

request = new Request(apiUrl, {
Expand Down

0 comments on commit fe4f586

Please sign in to comment.