Skip to content

Commit

Permalink
ManjaNoon : no more MangaStream (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeZeDev authored Jan 11, 2025
1 parent 8c34a90 commit 58f68ad
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
19 changes: 13 additions & 6 deletions web/src/engine/websites/Manjanoon.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
import { Tags } from '../Tags';
import icon from './Manjanoon.webp';
import { DecoratableMangaScraper } from '../providers/MangaPlugin';
import * as MangaStream from './decorators/WordPressMangaStream';
import * as Common from './decorators/Common';

@MangaStream.MangaCSS(/^{origin}\/manga\/[^/]+\/$/)
@MangaStream.MangasSinglePageCSS()
@MangaStream.ChaptersSinglePageCSS()
@MangaStream.PagesSinglePageJS()
const pageScripts = `
new Promise ( resolve => {
const realUrl = document.documentElement.innerHTML.match(/realUrl\\s*=\\s*\`([^$]+)/)[1];
resolve( [...document.querySelectorAll('.myImage')].map(image => new URL(image.getAttribute('uid'), realUrl).href));
});
`;

@Common.MangaCSS(/^{origin}\/series\/[^/]+$/, 'div.grid div.grid h1')
@Common.MangasSinglePagesCSS(['/latest'], 'div.grid a.grid', Common.AnchorInfoExtractor(true))
@Common.ChaptersSinglePageCSS('div#chapters a', Common.AnchorInfoExtractor(true))
@Common.PagesSinglePageJS(pageScripts, 500)
@Common.ImageAjax()
export default class extends DecoratableMangaScraper {

public constructor() {
super('manjanoon', 'Manjanoon', 'https://vrnoin.site', Tags.Media.Manhwa, Tags.Media.Manhua, Tags.Media.Manga, Tags.Language.Arabic, Tags.Source.Scanlator);
super('manjanoon', 'Manjanoon', 'https://manjanoon.art', Tags.Media.Manhwa, Tags.Media.Manhua, Tags.Media.Manga, Tags.Language.Arabic, Tags.Source.Scanlator);
}
public override get Icon() {
return icon;
}

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

const config = {
new TestFixture({
plugin: {
id: 'manjanoon',
title: 'Manjanoon'
},
container: {
url: 'https://vrnoin.site/manga/nn-holding-you-captive/',
id: '/manga/nn-holding-you-captive/',
title: 'Holding You Captive'
url: 'https://manjanoon.art/series/76e12b14-016f-498b-b28f-95965c50747c',
id: '/series/76e12b14-016f-498b-b28f-95965c50747c',
title: 'Put Me to Sleep'
},
child: {
id: '/nn-holding-you-captive-%d8%a7%d9%84%d9%81%d8%b5%d9%84-22/',
title: 'الفصل 22'
id: '/read/a64f046f-0244-4008-bc88-eccd6f96f21d',
title: 'فصل 26'
},
entry: {
index: 0,
size: 1_244_612,
type: 'image/webp'
size: 756_503,
type: 'image/jpeg'
}
};

new TestFixture(config).AssertWebsite();
}).AssertWebsite();

0 comments on commit 58f68ad

Please sign in to comment.