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 TAAD Decorator and Websites #171

Open
wants to merge 82 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
60c3fa8
Add TAAD Decorator and Websites
MikeZeDev Jul 4, 2023
3d1a696
move from legacy
MikeZeDev Jul 11, 2023
177fc03
add tests
MikeZeDev Jul 11, 2023
dc04fbb
Update NineMangaIT_e2e.ts
MikeZeDev Jul 11, 2023
8544380
Merge branch 'master' into TAADD
MikeZeDev Aug 8, 2023
eb76dda
Merge branch 'master' into TAADD
MikeZeDev Sep 20, 2023
69de34e
Merge branch 'master' into TAADD
MikeZeDev Sep 28, 2023
1167aba
Update _index.ts
MikeZeDev Sep 28, 2023
6e8750f
Merge branch 'master' into TAADD
MikeZeDev Oct 1, 2023
88afecc
Update _index.ts
MikeZeDev Oct 1, 2023
7404ae7
Merge branch 'master' into TAADD
MikeZeDev Oct 4, 2023
7754390
Merge branch 'master' into TAADD
MikeZeDev Oct 4, 2023
81a98b8
Merge branch 'master' into TAADD
MikeZeDev Oct 15, 2023
2934ac5
Update _index.ts
MikeZeDev Oct 15, 2023
2d6a831
fix spacing
MikeZeDev Oct 15, 2023
555d283
fix spacing
MikeZeDev Oct 15, 2023
fcf641b
use new error in decorator
MikeZeDev Oct 15, 2023
d571ccb
Merge branch 'master' into TAADD
MikeZeDev Oct 23, 2023
e60fecb
Update _index.ts
MikeZeDev Oct 23, 2023
58af330
Merge branch 'master' into TAADD
MikeZeDev Oct 29, 2023
93002a1
Merge branch 'master' into TAADD
MikeZeDev Nov 2, 2023
15df3bf
Update _index.ts
MikeZeDev Nov 2, 2023
0a467b6
better regexp
MikeZeDev Nov 8, 2023
c41dd6a
Merge branch 'master' into TAADD
MikeZeDev Nov 12, 2023
d57c36c
use origin placeholder
MikeZeDev Nov 12, 2023
1e8ab21
Merge branch 'master' into TAADD
MikeZeDev Dec 14, 2023
953e24e
Update _index.ts
MikeZeDev Dec 14, 2023
97987cd
Update TAADD.ts
MikeZeDev Dec 16, 2023
7b52f99
Merge branch 'master' into TAADD
MikeZeDev Dec 21, 2023
280c2f4
Update _index.ts
MikeZeDev Dec 21, 2023
4453690
Merge branch 'master' into TAADD
MikeZeDev Jan 5, 2024
10a1cc8
Update _index.ts
MikeZeDev Jan 5, 2024
a80bde7
Merge branch 'master' into TAADD
MikeZeDev Jan 16, 2024
fb20a7a
improve platform abstraction
MikeZeDev Jan 16, 2024
1e92501
Merge branch 'master' into TAADD
MikeZeDev Feb 26, 2024
8b250df
Update _index.ts
MikeZeDev Feb 26, 2024
923d9a1
taadd minor code changes
MikeZeDev Mar 9, 2024
947cde2
Merge branch 'master' into TAADD
MikeZeDev Mar 23, 2024
7cf945e
Merge branch 'master' into TAADD
MikeZeDev Apr 26, 2024
a533c66
Remove WieManga
MikeZeDev Apr 26, 2024
bb1b37f
TAAD decorator : use FetchCSS
MikeZeDev Apr 26, 2024
f94a9d3
fix tests
MikeZeDev Apr 26, 2024
d55c121
Update TAADD.ts
MikeZeDev Apr 26, 2024
b36700b
Merge branch 'master' into TAADD
MikeZeDev Apr 27, 2024
5fbfba7
Update _index.ts
MikeZeDev Apr 27, 2024
678f50c
use correct case
MikeZeDev Apr 27, 2024
bf95c87
Merge branch 'master' into TAADD
MikeZeDev May 7, 2024
7b91a75
update e2e tests to use vitest
MikeZeDev May 7, 2024
32db1ee
Merge branch 'master' into TAADD
MikeZeDev May 18, 2024
bdd1fe9
Update _index.ts
MikeZeDev May 18, 2024
ec1a1bc
Merge branch 'master' into TAADD
MikeZeDev Jun 15, 2024
4af2014
Merge branch 'master' into TAADD
MikeZeDev Jul 11, 2024
2722f1a
Merge branch 'master' into TAADD
MikeZeDev Jul 23, 2024
1f87dae
Update _index.ts
MikeZeDev Jul 23, 2024
54b2f69
uses encodeURI on russians tests
MikeZeDev Jul 23, 2024
f831608
Merge branch 'master' into TAADD
MikeZeDev Jul 28, 2024
a2114af
rewrite PagesSinglePagesCSS & create ImageAjaxFromHTML
MikeZeDev Aug 7, 2024
c4b23c5
Merge branch 'master' into TAADD
MikeZeDev Aug 7, 2024
531b1f8
lint fixes
MikeZeDev Aug 7, 2024
509d465
Update MangaRussia_e2e.ts
MikeZeDev Aug 10, 2024
742caed
Merge branch 'master' into TAADD
MikeZeDev Aug 14, 2024
c7278c4
Update _index.ts
MikeZeDev Aug 14, 2024
cf0a4ad
Merge branch 'master' into TAADD
MikeZeDev Aug 16, 2024
83bc0e2
Update _index.ts
MikeZeDev Aug 16, 2024
155d713
Merge branch 'master' into TAADD
MikeZeDev Sep 9, 2024
478ded9
Update _index.ts
MikeZeDev Sep 9, 2024
21a1609
rewrite FetchImageAjaxFromHTML to keep one Job only
MikeZeDev Sep 23, 2024
b5c97bf
Merge branch 'master' into TAADD
MikeZeDev Sep 28, 2024
9b310e2
Update _index.ts
MikeZeDev Sep 28, 2024
61030a1
Merge branch 'master' into TAADD
MikeZeDev Oct 7, 2024
034673b
Update _index.ts
MikeZeDev Oct 7, 2024
d95c5e8
Merge branch 'master' into TAADD
MikeZeDev Oct 13, 2024
e1aa22a
minor code changes
MikeZeDev Oct 13, 2024
165c54a
Update TAADD.ts
MikeZeDev Oct 13, 2024
9d03b6e
Merge branch 'master' into TAADD
MikeZeDev Oct 27, 2024
24254ea
update tests
MikeZeDev Oct 27, 2024
8394315
Merge branch 'master' into TAADD
MikeZeDev Nov 2, 2024
e66e08a
Update _index.ts
MikeZeDev Nov 2, 2024
8549205
Merge branch 'master' into TAADD
MikeZeDev Nov 17, 2024
e92f5e6
Merge branch 'master' into TAADD
MikeZeDev Nov 26, 2024
5204f6a
Merge branch 'master' into TAADD
MikeZeDev Dec 15, 2024
9dacf62
fix tests
MikeZeDev Jan 18, 2025
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
19 changes: 19 additions & 0 deletions web/src/engine/websites/MangaRussia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Tags } from '../Tags';
import icon from './MangaRussia.webp';
import { DecoratableMangaScraper } from '../providers/MangaPlugin';
import * as TAADD from './decorators/TAADD';
import * as Common from './decorators/Common';

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html$/, 'div.mangabookbox div.bookmessagebox h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas, 1, 1, 0, Common.AnchorInfoExtractor(true))
@TAADD.ChaptersSinglePageCSS('div.chapterlist table tr td.col1 a', TAADD.ChapterExtractor, false)
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('mangarussia', `MangaRussia`, 'https://www.mangarussia.com', Tags.Language.Russian, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
24 changes: 24 additions & 0 deletions web/src/engine/websites/MangaRussia_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: 'mangarussia',
title: 'MangaRussia'
},
container: {
url: 'https://www.mangarussia.com/manga/Дандадан.html',
id: encodeURI('/manga/Дандадан.html'),
title: 'Дандадан',
},
child: {
id: encodeURI('/chapter/Дандадан+16+-+141+Переели+вкусняшек/4332724/'),
title: '16 - 141 Переели вкусняшек',
},
entry: {
index: 0,
size: 819_587, // 752_216 or 819_587
type: 'image/jpeg'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-br', `NineMangaBR`, 'https://br.ninemanga.com', Tags.Language.Portuguese, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
25 changes: 25 additions & 0 deletions web/src/engine/websites/NineMangaBR_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: 'ninemanga-br',
title: 'NineMangaBR'
},
container: {
url: 'https://br.ninemanga.com/manga/Kingdom.html',
id: '/manga/Kingdom.html',
title: 'Kingdom',
},
child: {
id: '/chapter/Kingdom/6718490.html',
title: '762',
timeout: 10000
},
entry: {
index: 2,
size: 306_842,
type: 'image/webp'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-de', `NineMangaDE`, 'https://de.ninemanga.com', Tags.Language.German, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
24 changes: 24 additions & 0 deletions web/src/engine/websites/NineMangaDE_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: 'ninemanga-de',
title: 'NineMangaDE'
},
container: {
url: 'https://de.ninemanga.com/manga/Tales+of+Demons+and+Gods.html',
id: '/manga/Tales+of+Demons+and+Gods.html',
title: 'Tales of Demons and Gods',
},
child: {
id: '/chapter/Tales%20of%20Demons%20and%20Gods/453688.html',
title: 'Tales of Demons and Gods 160.5', //yes, chapter contains two times manga title, :D
},
entry: {
index: 0,
size: 409_917, //120_614 or 409_917
type: 'image/jpeg'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-en', `NineMangaEN`, 'https://en.ninemanga.com', Tags.Language.English, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
24 changes: 24 additions & 0 deletions web/src/engine/websites/NineMangaEN_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: 'ninemanga-en',
title: 'NineMangaEN'
},
container: {
url: 'https://en.ninemanga.com/manga/My+Angel+Childhood+Friend+was+a+Gal+When+We+Met+Again.html',
id: '/manga/My+Angel+Childhood+Friend+was+a+Gal+When+We+Met+Again.html',
title: 'My Angel Childhood Friend was a Gal When We Met Again',
},
child: {
id: '/chapter/My%20Angel%20Childhood%20Friend%20was%20a%20Gal%20When%20We%20Met%20Again/8875625.html',
title: 'Chapter 14',
},
entry: {
index: 1,
size: 203_785,
type: 'image/jpeg'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-es', `NineMangaES`, 'https://es.ninemanga.com', Tags.Language.English, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
26 changes: 26 additions & 0 deletions web/src/engine/websites/NineMangaES_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'ninemanga-es',
title: 'NineMangaES'
},
container: {
url: 'https://es.ninemanga.com/manga/Martial+Peak.html',
id: '/manga/Martial+Peak.html',
title: 'Martial Peak',
},
child: {
id: '/chapter/Martial%20Peak/1855269.html',
title: 'Capitulo 3440',
timeout: 15000

},
entry: {
index: 1,
size: 110_242,
type: 'image/webp'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-fr', `NineMangaFR`, 'https://fr.ninemanga.com', Tags.Language.French, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
26 changes: 26 additions & 0 deletions web/src/engine/websites/NineMangaFR_e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { TestFixture } from '../../../test/WebsitesFixture';

const config = {
plugin: {
id: 'ninemanga-fr',
title: 'NineMangaFR'
},
container: {
url: 'https://fr.ninemanga.com/manga/Lycoris+Recoil.html',
id: '/manga/Lycoris+Recoil.html',
title: 'Lycoris Recoil',
},
child: {
id: '/chapter/Lycoris%20Recoil/722483.html',
title: '4',
timeout: 15000

},
entry: {
index: 1,
size: 108_568,
type: 'image/webp'
}
};

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

@Common.MangaCSS(/^{origin}\/manga\/[^/]+\.html/, 'div.manga div.ttline h1', TAADD.MangaLabelExtractor)
@Common.MangasMultiPageCSS(TAADD.mangaPath, TAADD.queryMangas)
@TAADD.ChaptersSinglePageCSS()
@TAADD.PagesSinglePageCSS()
@TAADD.ImageAjaxFromHTML()
export default class extends DecoratableMangaScraper {
public constructor() {
super('ninemanga-it', `NineMangaIT`, 'https://it.ninemanga.com', Tags.Language.Italian, Tags.Media.Manga, Tags.Media.Manhua, Tags.Media.Manhwa, Tags.Source.Aggregator);
}
public override get Icon() {
return icon;
}
}
24 changes: 24 additions & 0 deletions web/src/engine/websites/NineMangaIT_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: 'ninemanga-it',
title: 'NineMangaIT'
},
container: {
url: 'https://it.ninemanga.com/manga/Level+Up+with+the+Gods.html',
id: '/manga/Level+Up+with+the+Gods.html',
title: 'Level Up with the Gods',
},
child: {
id: '/chapter/Level%20Up%20with%20the%20Gods/970365.html',
title: '35',
},
entry: {
index: 1,
size: 869_059,
type: 'image/jpeg'
}
};

new TestFixture(config).AssertWebsite();
Loading