Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FlatManga decorator and websites #155

Open
wants to merge 126 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
1f6ecda
Add FlatManga decorator and plugins
MikeZeDev Jun 10, 2023
d19c61a
Update FlatManga.ts
MikeZeDev Jun 10, 2023
974e12b
Update KissAway.ts
MikeZeDev Jun 10, 2023
be0134b
case insensitive replace
MikeZeDev Jun 12, 2023
25d5d3c
remove useless parameters
MikeZeDev Jun 21, 2023
3faab1d
moved sites from legacy and add tests
MikeZeDev Jul 8, 2023
c895675
some changes
MikeZeDev Jul 8, 2023
5697c7a
Update KissAway.ts
MikeZeDev Jul 18, 2023
1fb26dd
Merge branch 'master' into flatmanga
MikeZeDev Aug 8, 2023
719c9d8
Merge branch 'master' into flatmanga
MikeZeDev Aug 28, 2023
273fc11
Merge branch 'master' into flatmanga
MikeZeDev Sep 20, 2023
28fe2a0
Merge branch 'master' into flatmanga
MikeZeDev Sep 28, 2023
cf64432
weloma / lovehug fixes
MikeZeDev Sep 29, 2023
4e8791f
Merge branch 'master' into flatmanga
MikeZeDev Oct 1, 2023
e266344
Merge branch 'master' into flatmanga
MikeZeDev Oct 4, 2023
e48ba7e
Merge branch 'master' into flatmanga
MikeZeDev Oct 4, 2023
335914d
Merge branch 'master' into flatmanga
MikeZeDev Oct 15, 2023
a735982
fix spacing
MikeZeDev Oct 15, 2023
50a8708
lovehug => welovemanga
MikeZeDev Oct 15, 2023
bc1f47e
use new error in decorator
MikeZeDev Oct 15, 2023
4f2a830
Merge branch 'master' into flatmanga
MikeZeDev Oct 23, 2023
9042184
Update _index.ts
MikeZeDev Oct 23, 2023
4244c87
Merge branch 'master' into flatmanga
MikeZeDev Oct 29, 2023
3e732f8
Merge branch 'master' into flatmanga
MikeZeDev Nov 2, 2023
459522f
Update _index.ts
MikeZeDev Nov 2, 2023
8bbb9da
better regexp
MikeZeDev Nov 8, 2023
0616125
Update FlatManga.ts
MikeZeDev Nov 8, 2023
3a87cb7
Merge branch 'master' into flatmanga
MikeZeDev Nov 12, 2023
cc0f73f
use origin placeholder
MikeZeDev Nov 12, 2023
81053fa
Merge branch 'master' into flatmanga
MikeZeDev Dec 5, 2023
a3f2d06
Flatmanga : code improvement && use distinct
MikeZeDev Dec 5, 2023
52cc833
add KLManga (old Kissaway)
MikeZeDev Dec 5, 2023
04fa722
add TruyenChapVn
MikeZeDev Dec 21, 2023
f01a41c
Merge branch 'master' into flatmanga
MikeZeDev Dec 21, 2023
77b5452
Update BookmarkConverter_test.ts
MikeZeDev Dec 21, 2023
ba82ca6
Merge branch 'master' into flatmanga
MikeZeDev Jan 5, 2024
c032f36
Update _index.ts
MikeZeDev Jan 5, 2024
77be47e
Merge branch 'master' into flatmanga
MikeZeDev Jan 16, 2024
0bf3faa
improve platform abstraction
MikeZeDev Jan 16, 2024
c4c847f
WeloveManga : filter junk picture
MikeZeDev Jan 25, 2024
cde9c4a
Merge branch 'master' into flatmanga
MikeZeDev Feb 1, 2024
ec4a8a5
Flatmanga ; trim manga title
MikeZeDev Feb 1, 2024
76e58e8
Add OlimpoScan
MikeZeDev Feb 1, 2024
90e9ae1
Flatmanga : generic multipage manga patth
MikeZeDev Feb 1, 2024
7d0aa48
Add NicoManga
MikeZeDev Feb 1, 2024
517a84b
Merge branch 'master' into flatmanga
MikeZeDev Feb 5, 2024
6bf2137
Update _index.ts
MikeZeDev Feb 5, 2024
ea13c01
Merge branch 'master' into flatmanga
MikeZeDev Feb 26, 2024
5ad884f
minor fixes
MikeZeDev Mar 8, 2024
c4f5241
Nicomanga : fix async promise
MikeZeDev Mar 9, 2024
2a17406
minor fixes (href)
MikeZeDev Mar 9, 2024
60550ac
Merge branch 'master' into flatmanga
MikeZeDev Mar 9, 2024
d6fccdb
Update BookmarkConverter.ts
MikeZeDev Mar 9, 2024
063ab2c
remove Truyentranhlh (dead)
MikeZeDev Mar 17, 2024
44c7421
Merge branch 'master' into flatmanga
MikeZeDev Mar 24, 2024
ca340fa
Add RawInu
MikeZeDev Mar 24, 2024
4af6d03
Add MangaGun
MikeZeDev Apr 19, 2024
dd7fbfc
Merge branch 'master' into flatmanga
MikeZeDev Apr 26, 2024
cf67356
Merge branch 'master' into flatmanga
MikeZeDev Apr 27, 2024
10d1d21
Update _index.ts
MikeZeDev Apr 27, 2024
80f4bc0
use pascal case
MikeZeDev Apr 27, 2024
e01e287
Merge branch 'master' into flatmanga
MikeZeDev May 7, 2024
082dc52
update e2e tests to use vitest
MikeZeDev May 7, 2024
1a66340
Merge branch 'master' into flatmanga
MikeZeDev May 18, 2024
745c309
Update _index.ts
MikeZeDev May 18, 2024
3c14d8e
weloma : fix test
MikeZeDev May 18, 2024
3a90282
KLManga : fix getting chapters & pages
MikeZeDev May 26, 2024
03b39a4
filter olimposcans ads
MikeZeDev Jun 1, 2024
0142da3
Merge branch 'master' into flatmanga
MikeZeDev Jun 2, 2024
4f91a34
Update _index.ts
MikeZeDev Jun 2, 2024
c007db8
Merge branch 'master' into flatmanga
MikeZeDev Jun 15, 2024
e04a4c7
Update _index.ts
MikeZeDev Jun 15, 2024
d5fef7b
Merge branch 'master' into flatmanga
MikeZeDev Jul 6, 2024
9eaed81
add bookmarks mapping
MikeZeDev Jul 6, 2024
e5679e7
Remove TruyenChapVN
MikeZeDev Jul 22, 2024
ab2262d
Merge branch 'master' into flatmanga
MikeZeDev Jul 22, 2024
f5fdf6a
Update _index.ts
MikeZeDev Jul 22, 2024
76965a0
KLmanga : get rid of scripts
MikeZeDev Jul 22, 2024
47eb799
Mangagun : no scripts and handle antiDdoSS
MikeZeDev Jul 22, 2024
5036bf7
Manga-TR : filter manga without title in list
MikeZeDev Jul 22, 2024
85e6ebc
fix test
MikeZeDev Jul 22, 2024
fce396f
minor code changes
MikeZeDev Jul 22, 2024
290c5c5
fix type
MikeZeDev Jul 22, 2024
b4b457c
Nicomanga : handle antiddoss, remove scripts
MikeZeDev Jul 22, 2024
4a92af2
fix variable regexp
MikeZeDev Jul 22, 2024
42cbb4d
Rawinu : handle antiddoss and remove scripts
MikeZeDev Jul 22, 2024
5327e2e
Weloma: handle AntiDDoss
MikeZeDev Jul 22, 2024
263c1b8
reduce initial timeout
MikeZeDev Jul 22, 2024
7589b6d
WeloveManga : handle anti ddoss & remove scripts
MikeZeDev Jul 22, 2024
5589a4b
remove useless code
MikeZeDev Jul 22, 2024
06a71c1
Update WeLoveManga.ts
MikeZeDev Jul 22, 2024
177a96d
remove Manga33
MikeZeDev Jul 23, 2024
d61080a
OlimpoScans : change domain
MikeZeDev Jul 23, 2024
5bd680f
Update MangaTR.ts
MikeZeDev Jul 23, 2024
cab102a
Rewrite of FlatManga websites
MikeZeDev Jul 23, 2024
4aba493
Merge branch 'master' into flatmanga
MikeZeDev Jul 23, 2024
2e28a87
Update _index.ts
MikeZeDev Jul 23, 2024
ee27f07
Nicomanga : use API for manga list
MikeZeDev Jul 26, 2024
d4dad6f
FlatManga: add Anti scraping detection
MikeZeDev Jul 26, 2024
ebe4a40
Update FlatManga.ts
MikeZeDev Jul 26, 2024
0b1c0ff
Merge branch 'master' into flatmanga
MikeZeDev Jul 28, 2024
ca1b562
Merge branch 'master' into flatmanga
MikeZeDev Aug 10, 2024
6d7fa81
fix bookmarkconverter after mastermerge
MikeZeDev Aug 10, 2024
020459b
ignore unused var in catch
MikeZeDev Aug 10, 2024
ad82535
use RegExpSafe on safe regexp
MikeZeDev Aug 10, 2024
dcbbc68
Merge branch 'master' into flatmanga
MikeZeDev Aug 10, 2024
2c95d55
Merge branch 'master' into flatmanga
MikeZeDev Aug 14, 2024
9d9f8d5
Update _index.ts
MikeZeDev Aug 14, 2024
810c162
rewrite titles cleaning
MikeZeDev Aug 15, 2024
cba8c30
Merge branch 'master' into flatmanga
MikeZeDev Aug 16, 2024
7e4d8cc
Merge branch 'master' into flatmanga
MikeZeDev Sep 9, 2024
cc4f91c
minor code changes
MikeZeDev Sep 23, 2024
e6f8771
Merge branch 'master' into flatmanga
MikeZeDev Oct 7, 2024
5af35c7
Update AntiScraping
MikeZeDev Oct 7, 2024
eb23235
Merge branch 'master' into flatmanga
MikeZeDev Oct 13, 2024
eecd97e
Merge branch 'master' into flatmanga
MikeZeDev Oct 27, 2024
0f0e84c
update tests
MikeZeDev Oct 27, 2024
7cf614e
Merge branch 'master' into flatmanga
MikeZeDev Nov 17, 2024
af7f554
Update _index.ts
MikeZeDev Nov 17, 2024
6965add
Update FlatManga.ts
MikeZeDev Nov 17, 2024
0b90e21
Merge branch 'master' into flatmanga
MikeZeDev Nov 26, 2024
9a8b811
remove useless decorator
MikeZeDev Nov 28, 2024
ccf80ac
Merge branch 'master' into flatmanga
MikeZeDev Dec 7, 2024
17f33c4
Merge branch 'master' into flatmanga
MikeZeDev Dec 15, 2024
fe4f586
reflect Common changes
MikeZeDev Dec 15, 2024
f2b00bf
Update FlatManga.ts
MikeZeDev Dec 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions web/src/engine/transformers/BookmarkConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ export const legacyWebsiteIdentifierMap = new Map([
[ 'gateanimemanga', 'gatemanga' ],
[ 'imperioscans', 'neroxus' ],
[ 'instamanhwa', 'xmanhwa' ],
[ 'kissaway', 'klmanga' ],
[ 'kisscomic', 'readcomiconline' ],
[ 'komikav', 'apkomik' ],
[ 'kumascans', 'retsu' ],
[ 'lovehug', 'welovemanga' ],
[ 'lyrascans', 'quantumscans' ],
[ 'mangamx', 'mangaoni' ],
[ 'manganel', 'manganato' ],
Expand Down
2 changes: 2 additions & 0 deletions web/src/engine/transformers/BookmarkConverter_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ const legacyWebsiteIdentifierMapTestCases = [
{ sourceID: 'gateanimemanga', targetID: 'gatemanga' },
{ sourceID: 'imperioscans', targetID: 'neroxus' },
{ sourceID: 'instamanhwa', targetID: 'xmanhwa' },
{ sourceID: 'kissaway', targetID: 'klmanga' },
{ sourceID: 'kisscomic', targetID: 'readcomiconline' },
{ sourceID: 'komikav', targetID: 'apkomik' },
{ sourceID: 'kumascans', targetID: 'retsu' },
{ sourceID: 'lovehug', targetID: 'welovemanga' },
{ sourceID: 'lyrascans', targetID: 'quantumscans' },
{ sourceID: 'mangamx', targetID: 'mangaoni' },
{ sourceID: 'manganel', targetID: 'manganato' },
Expand Down
28 changes: 28 additions & 0 deletions web/src/engine/websites/KLManga.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Tags } from '../Tags';
import icon from './KLManga.webp';
import { DecoratableMangaScraper } from '../providers/MangaPlugin';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';

function GenerateRandomEndPoint(length: number, suffix: string): string {
const r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
let randomEndpoint = '';
for (let o = 0; o < length; o++) randomEndpoint += r.charAt(Math.floor(Math.random() * r.length));
return randomEndpoint + suffix;
}

@Common.MangaCSS(/^{origin}\/[^/]+\.html$/, FlatManga.queryMangaTitle, FlatManga.MangaLabelExtractor)
@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/])
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {

public constructor() {
super('klmanga', `KLManga`, 'https://klz9.com', Tags.Language.Japanese, Tags.Media.Manga, Tags.Source.Aggregator);
}

public override get Icon() {
return icon;
}
}
Binary file added web/src/engine/websites/KLManga.webp
Binary file not shown.
24 changes: 24 additions & 0 deletions web/src/engine/websites/KLManga_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { TestFixture, type Config } from '../../../test/WebsitesFixture';

const config: Config = {
plugin: {
id: 'klmanga',
title: 'KLManga'
},
container: {
url: 'https://klz9.com/ybed-isekai-koushoku-musou-roku-isekai-tensei-no-chie-to-chikara-wo-tada-hitasura-xxxx-suru-tame-ni-tsukau.html',
id: '/ybed-isekai-koushoku-musou-roku-isekai-tensei-no-chie-to-chikara-wo-tada-hitasura-xxxx-suru-tame-ni-tsukau.html',
title: 'Isekai Koushoku Musou Roku - Isekai Tensei No Chie To Chikara Wo, Tada Hitasura Xxxx Suru Tame Ni Tsukau'
},
child: {
id: '/jxsh-isekai-koushoku-musou-roku-isekai-tensei-no-chie-to-chikara-wo-tada-hitasura-xxxx-suru-tame-ni-tsukau-chapter-16.html',
title: 'Chapter 16'
},
entry: {
index: 0,
size: 494_933,
type: 'image/jpeg'
}
};

new TestFixture(config).AssertWebsite();
21 changes: 21 additions & 0 deletions web/src/engine/websites/MangaGun.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Tags } from '../Tags';
import icon from './MangaGun.webp';
import { DecoratableMangaScraper } from '../providers/MangaPlugin';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';

@Common.MangaCSS(/^{origin}\/manga-[^/]+\.html$/, FlatManga.queryMangaTitle, FlatManga.MangaLabelExtractor)
@Common.MangasMultiPageCSS(FlatManga.pathMultiPageManga, FlatManga.queryMangas, 1, 1, 0, FlatManga.MangaExtractor)
@FlatManga.ChaptersSinglePageAJAX('/app/manga/controllers/cont.Listchapter.php?slug=', 'sLugs')
@FlatManga.PagesSinglePageAJAX('/app/manga/controllers/cont.Showimage.php?cid=')
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {

public constructor() {
super('mangagun', `MangaGun`, 'https://mangagun.net', Tags.Language.English, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}

public override get Icon() {
return icon;
}
}
Binary file added web/src/engine/websites/MangaGun.webp
Binary file not shown.
24 changes: 24 additions & 0 deletions web/src/engine/websites/MangaGun_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'mangagun',
title: 'MangaGun'
},
container: {
url: 'https://mangagun.net/manga-oshi-no-ko-raw.html',
id: '/manga-oshi-no-ko-raw.html',
title: 'OSHI NO KO'
},
child: {
id: '/read-oshi-no-ko-raw-chapter-146.html',
title: 'Chapter 146'
},
entry: {
index: 0,
size: 297_654,
type: 'image/jpeg',
}
};

new TestFixture(config).AssertWebsite();
59 changes: 59 additions & 0 deletions web/src/engine/websites/MangaTR.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { Tags } from '../Tags';
import icon from './MangaTR.webp';
import { Chapter, DecoratableMangaScraper, type MangaPlugin, type Manga } from '../providers/MangaPlugin';
import { FetchCSS, FetchWindowScript } from '../platform/FetchProvider';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';

function MangaLabelExtractor(element: HTMLTitleElement) {
return element.text.split(' - ')[0].trim();
}

@Common.MangaCSS(/^{origin}\/manga-[^/]+\.html$/, 'body title', MangaLabelExtractor)
@FlatManga.PagesSinglePageCSS('img.chapter-img')
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {
public constructor() {
super('mangatr', `Manga-TR`, 'https://manga-tr.com', Tags.Language.Turkish, Tags.Media.Manga, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}

public override async Initialize(): Promise<void> {
const request = new Request(new URL('/manga-list.html', this.URI));
return FetchWindowScript(request, `window.cookieStore.set('read_type', '1')`, 0, 30000);
}

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

public override async FetchChapters(manga: Manga): Promise<Chapter[]> {
const chapterList = [];
for (let page = 1, run = true; run; page++) {
const chapters = await this.GetChaptersFromPage(manga, page);
chapters.length > 0 ? chapterList.push(...chapters) : run = false;
}
return chapterList;
}
private async GetChaptersFromPage(manga: Manga, page: number): Promise<Chapter[]>{
const mangaSlug = manga.Identifier.match(/manga-([^/]+)\.html/)[1];
const url = new URL(`/cek/fetch_pages_manga.php?manga_cek=${mangaSlug}`, this.URI);
const request = new Request(url, {
method: 'POST',
body: 'page=' + page,
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'x-requested-with': 'XMLHttpRequest'
}
});

const data = await FetchCSS<HTMLAnchorElement>(request, 'table.table tr td.table-bordered:first-of-type > a');
return data.map(chapter => {
const title = FlatManga.CleanTitle(chapter.text.replace(manga.Title, '')) || chapter.text.trim();
return new Chapter(this, manga, chapter.pathname, title);
});
}

}
24 changes: 24 additions & 0 deletions web/src/engine/websites/MangaTR_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'mangatr',
title: 'Manga-TR'
},
container: {
url: 'https://manga-tr.com/manga-mairimashita-iruma-kun.html',
id: '/manga-mairimashita-iruma-kun.html',
title: 'Mairimashita! Iruma-kun'
},
child: {
id: '/id-153837-read-mairimashita-iruma-kun-chapter-174.html',
title: '174'
},
entry: {
index: 1,
size: 342_746,
type: 'image/webp'
}
};

new TestFixture(config).AssertWebsite();
52 changes: 52 additions & 0 deletions web/src/engine/websites/NicoManga.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Tags } from '../Tags';
import icon from './NicoManga.webp';
import { DecoratableMangaScraper, Manga, type MangaPlugin } from '../providers/MangaPlugin';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';
import { FetchJSON } from '../platform/FetchProvider';

type APIMangas = {
manga_list: {
name: string,
slug: string
}[],
lang: {
manga_slug: string
}

}

@Common.MangaCSS(/^{origin}\/manga[^/]+\.html$/, FlatManga.queryMangaTitle)
@FlatManga.ChaptersSinglePageAJAX('/app/manga/controllers/cont.Listchapterapi.php?slug=', 'sLugs', 'ul > a', Common.AnchorInfoExtractor(true))
@FlatManga.PagesSinglePageAJAX('/app/manga/controllers/cont.imgsList.php?cid=', 'img.chapter-img:not([alt*="nicoscan"])')
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {

public constructor() {
super('nicomanga', `NicoManga`, 'https://nicomanga.com', Tags.Language.Japanese, Tags.Media.Manga, Tags.Source.Aggregator);
}

public override get Icon() {
return icon;
}

public override async FetchMangas(provider: MangaPlugin): Promise<Manga[]> {
const mangaList: Manga[] = [];
for (let page = 1, run = true; run; page++) {
const mangas = await this.GetMangasFromPageAJAX(provider, page);
mangaList.isMissingLastItemFrom(mangas) ? mangaList.push(...mangas) : run = false;
}
return mangaList.distinct();
}
private async GetMangasFromPageAJAX(provider: MangaPlugin, page: number): Promise<Manga[]> {
const request = new Request(new URL(`/app/manga/controllers/cont.display.homeTopday.php?page=${page}`, this.URI), {
headers: {
'Referer': new URL('/manga-list.html', this.URI.origin).href,
'X-Requested-With': 'XMLHttpRequest'
}
});
const { manga_list, lang: { manga_slug } } = await FetchJSON<APIMangas>(request);
return manga_list.map(manga => new Manga(this, provider, `/${manga_slug}-${manga.slug}.html`, FlatManga.CleanTitle(manga.name.trim())));
}

}
Binary file added web/src/engine/websites/NicoManga.webp
Binary file not shown.
25 changes: 25 additions & 0 deletions web/src/engine/websites/NicoManga_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'nicomanga',
title: 'NicoManga'
},
container: {
url: 'https://nicomanga.com/manga-kage-no-jitsuryokusha-ni-naritakute-raw.html',
id: '/manga-kage-no-jitsuryokusha-ni-naritakute-raw.html',
title: 'TO BE A POWER IN THE SHADOWS! (MANGA)'
},
child: {
id: '/read-kage-no-jitsuryokusha-ni-naritakute-raw-chapter-60.2.html',
title: 'Chapter 60.2',
timeout: 15000
},
entry: {
index: 0,
size: 708_342,
type: 'image/jpeg'
}
};

new TestFixture(config).AssertWebsite();
30 changes: 30 additions & 0 deletions web/src/engine/websites/OlimpoScans.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Tags } from '../Tags';
import icon from './OlimpoScans.webp';
import { type Chapter, DecoratableMangaScraper, Page } from '../providers/MangaPlugin';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';

@Common.MangaCSS(/^{origin}\/[^/]+\.html$/, FlatManga.queryMangaTitle, FlatManga.MangaLabelExtractor)
@Common.MangasMultiPageCSS(FlatManga.pathMultiPageManga, FlatManga.queryMangas, 1, 1, 0, FlatManga.MangaExtractor)
@Common.ChaptersSinglePageCSS(FlatManga.queryChapters, FlatManga.ChapterExtractor)
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {
public constructor() {
super('olimposcans', `OlimpoScans`, 'https://leerolimpo.com', Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Language.Spanish, Tags.Source.Scanlator);
}

public override get Icon() {
return icon;
}

public override async FetchPages(chapter: Chapter): Promise<Page[]> {
const pages = await FlatManga.FetchPagesSinglePageCSS.call(this, chapter);
return pages.map(page => new Page(this, chapter, this.StripSearch(page.Link)));
}

StripSearch(link: URL): URL {
link.pathname = link.pathname.replace(/&.*/g, '');
return link;

}
}
Binary file added web/src/engine/websites/OlimpoScans.webp
Binary file not shown.
24 changes: 24 additions & 0 deletions web/src/engine/websites/OlimpoScans_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'olimposcans',
title: 'OlimpoScans'
},
container: {
url: 'https://leerolimpo.com/comic-bjorn-el-barbaro.html',
id: '/comic-bjorn-el-barbaro.html',
title: 'BJORN EL BARBARO'
},
child: {
id: '/leer-bjorn-el-barbaro-capitulo-50.html',
title: 'Capítulo 50',
},
entry: {
index: 1,
size: 273_422,
type: 'image/webp'
}
};

new TestFixture(config).AssertWebsite();
25 changes: 25 additions & 0 deletions web/src/engine/websites/RawInu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Tags } from '../Tags';
import icon from './RawInu.webp';
import { DecoratableMangaScraper } from '../providers/MangaPlugin';
import * as Common from './decorators/Common';
import * as FlatManga from './decorators/FlatManga';
import { FetchWindowScript } from '../platform/FetchProvider';

@Common.MangaCSS(/^{origin}\/[^.]+\.html$/, 'li.breadcrumb-item.active', FlatManga.MangaLabelExtractor)
@Common.MangasMultiPageCSS(FlatManga.pathMultiPageManga, FlatManga.queryMangas, 1, 1, 0, FlatManga.MangaExtractor)
@FlatManga.ChaptersSinglePageAJAX('/app/manga/controllers/cont.Listchapter.php?slug=', 'sLugs')
@FlatManga.PagesSinglePageAJAX('/app/manga/controllers/cont.imagesChap.php?cid=')
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {
public constructor() {
super('rawinu', `RawInu`, 'https://rawinu.com', Tags.Media.Manga, Tags.Language.Japanese, Tags.Source.Aggregator);
}

public override get Icon() {
return icon;
}

public override async Initialize(): Promise<void> {
return await FetchWindowScript(new Request(new URL('/manga-list.html', this.URI)), 'true', 3000, 15000);//trigger antiDDOSS
}
}
Binary file added web/src/engine/websites/RawInu.webp
Binary file not shown.
Loading
Loading