-
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.
* Add AsuraScansFree manga-download/hakuneko#7612 * Add RagnarScans manga-download/hakuneko#7609 * Add BakaMH manga-download/hakuneko#7599 * Add UlasComic manga-download/hakuneko#7596
- Loading branch information
Showing
12 changed files
with
221 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Tags } from '../Tags'; | ||
import icon from './AsuraScans.webp'; | ||
import { DecoratableMangaScraper } from '../providers/MangaPlugin'; | ||
import * as MangaStream from './decorators/WordPressMangaStream'; | ||
import * as Common from './decorators/Common'; | ||
|
||
@MangaStream.MangaCSS(/^{origin}\/serie\/[^/]+\/$/) | ||
@MangaStream.MangasSinglePageCSS(undefined, '/serie/list-mode/') | ||
@MangaStream.ChaptersSinglePageCSS() | ||
@MangaStream.PagesSinglePageJS() | ||
@Common.ImageAjax() | ||
export default class extends DecoratableMangaScraper { | ||
|
||
public constructor() { | ||
super('arurascansfree', 'Asura Scans Free', 'https://asurascansfree.com', Tags.Media.Manhwa, Tags.Media.Manhua, Tags.Language.English, Tags.Source.Aggregator); | ||
} | ||
|
||
public override get Icon() { | ||
return icon; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TestFixture, type Config } from '../../../test/WebsitesFixture'; | ||
|
||
const config: Config = { | ||
plugin: { | ||
id: 'arurascansfree', | ||
title: 'Asura Scans Free', | ||
}, | ||
container: { | ||
url: 'https://asurascansfree.com/serie/academys-genius-swordmaster/', | ||
id: '/serie/academys-genius-swordmaster/', | ||
title: 'Academy’s Genius Swordmaster', | ||
}, | ||
child: { | ||
id: '/academys-genius-swordmaster-chapter-1/', | ||
title: 'Chapter 1', | ||
}, | ||
entry: { | ||
index: 1, | ||
size: 822_646, | ||
type: 'image/webp' | ||
} | ||
}; | ||
|
||
new TestFixture(config).AssertWebsite(); |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Tags } from '../Tags'; | ||
import icon from './BakaMH.webp'; | ||
import { DecoratableMangaScraper } from '../providers/MangaPlugin'; | ||
import * as Madara from './decorators/WordPressMadara'; | ||
import * as Common from './decorators/Common'; | ||
|
||
@Madara.MangaCSS(/^{origin}\/manga\/[^/]+\/$/, 'ol.breadcrumb li:last-of-type a') | ||
@Madara.MangasMultiPageAJAX() | ||
@Madara.ChaptersSinglePageAJAXv2() | ||
@Madara.PagesSinglePageCSS() | ||
@Common.ImageAjax() | ||
export default class extends DecoratableMangaScraper { | ||
|
||
public constructor() { | ||
super('bakamh', 'BakaMH', 'https://bakamh.com', Tags.Media.Manhwa, Tags.Language.Chinese, Tags.Source.Aggregator); | ||
} | ||
|
||
public override get Icon() { | ||
return icon; | ||
} | ||
} |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { TestFixture, type Config } from '../../../test/WebsitesFixture'; | ||
|
||
const mangaName = encodeURI('秘密教学'); | ||
|
||
const config: Config = { | ||
plugin: { | ||
id: 'bakamh', | ||
title: 'BakaMH', | ||
}, | ||
container: { | ||
url: 'https://bakamh.com/manga/秘密教学/', | ||
id: JSON.stringify({ post: '3037', slug: `/manga/${mangaName}/`}), | ||
title: '秘密教学', | ||
}, | ||
child: { | ||
id: `/manga/${mangaName.toLowerCase()}/c-244/`, | ||
title: '第244话 对薇亚坦承', | ||
}, | ||
entry: { | ||
index: 2, | ||
size: 452_647, | ||
type: 'image/jpeg' | ||
} | ||
}; | ||
|
||
new TestFixture(config).AssertWebsite(); |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Tags } from '../Tags'; | ||
import icon from './RagnarScans.webp'; | ||
import { DecoratableMangaScraper } from '../providers/MangaPlugin'; | ||
import * as Madara from './decorators/WordPressMadara'; | ||
import * as Common from './decorators/Common'; | ||
|
||
@Madara.MangaCSS(/^{origin}\/manga\/[^/]+\/$/, 'ol.breadcrumb li:last-of-type a') | ||
@Madara.MangasMultiPageAJAX() | ||
@Madara.ChaptersSinglePageAJAXv2() | ||
@Common.PagesSinglePageJS(Madara.WPMangaProtectorPagesExtractorScript, 2000) | ||
@Common.ImageAjax() | ||
export default class extends DecoratableMangaScraper { | ||
|
||
public constructor() { | ||
super('ragnarscans', 'Ragnar Scans', 'https://ragnarscans.com', Tags.Media.Manhwa, Tags.Media.Manhua, Tags.Language.Turkish, Tags.Source.Aggregator); | ||
} | ||
|
||
public override get Icon() { | ||
return icon; | ||
} | ||
} |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TestFixture, type Config } from '../../../test/WebsitesFixture'; | ||
|
||
const config: Config = { | ||
plugin: { | ||
id: 'ragnarscans', | ||
title: 'Ragnar Scans', | ||
}, | ||
container: { | ||
url: 'https://ragnarscans.com/manga/gosu/', | ||
id: JSON.stringify({ post: '6377', slug: '/manga/gosu/'}), | ||
title: 'Gosu', | ||
}, | ||
child: { | ||
id: '/manga/gosu/bolum-231/', | ||
title: 'Bölüm 231', | ||
}, | ||
entry: { | ||
index: 2, | ||
size: 132_826, | ||
type: 'image/jpeg' | ||
} | ||
}; | ||
|
||
new TestFixture(config).AssertWebsite(); |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Tags } from '../Tags'; | ||
import icon from './UlasComic.webp'; | ||
import { DecoratableMangaScraper, Manga, type MangaPlugin } from '../providers/MangaPlugin'; | ||
import * as MangaStream from './decorators/WordPressMangaStream'; | ||
import * as Common from './decorators/Common'; | ||
import { FetchJSON } from '../platform/FetchProvider'; | ||
|
||
type FeedResults = { | ||
feed: { | ||
entry: { | ||
link: { | ||
rel: string, | ||
href: string, | ||
title: string | ||
}[], | ||
}[] | ||
} | ||
} | ||
|
||
const pageScript = `[...document.querySelectorAll('div#readerarea img')].map(page => page.src);`; | ||
|
||
const chapterScript = ` | ||
new Promise(resolve => { | ||
resolve ( [...document.querySelectorAll('div#chapterlist ul li a')].map(chapter => { | ||
return { | ||
id: chapter.pathname, | ||
title: chapter.querySelector('.chapternum').textContent.trim() | ||
} | ||
})); | ||
}); | ||
`; | ||
|
||
@MangaStream.MangaCSS(/^{origin}\/\d+\/\d+\/[^.]+\.html$/) | ||
@Common.ChaptersSinglePageJS(chapterScript, 2500) | ||
@Common.PagesSinglePageJS(pageScript, 2500) | ||
@Common.ImageAjax() | ||
export default class extends DecoratableMangaScraper { | ||
|
||
public constructor() { | ||
super('ulascomic', 'Ulas Comic', 'https://www.ulascomic.xyz', Tags.Media.Manga, Tags.Language.Indonesian); | ||
} | ||
|
||
public override get Icon() { | ||
return icon; | ||
} | ||
|
||
public override async FetchMangas(provider: MangaPlugin): Promise<Manga[]> { | ||
const request = new Request(new URL(`/feeds/posts/summary/-/Series?start-index=1&max-results=99999&alt=json`, this.URI)); | ||
const { feed: { entry } } = await FetchJSON<FeedResults>(request); | ||
return entry.map(manga => { | ||
const link = manga.link.find(value => value.rel == 'alternate'); | ||
return new Manga(this, provider, new URL(link.href).pathname, link.title); | ||
}); | ||
} | ||
|
||
} |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { TestFixture, type Config } from '../../../test/WebsitesFixture'; | ||
|
||
const config: Config = { | ||
plugin: { | ||
id: 'ulascomic', | ||
title: 'Ulas Comic', | ||
}, | ||
container: { | ||
url: 'https://www.ulascomic.xyz/2024/05/god-of-blackfield.html', | ||
id: '/2024/05/god-of-blackfield.html', | ||
title: 'God Of Blackfield', | ||
}, | ||
child: { | ||
id: `/2024/05/chapter-01.html`, | ||
title: 'Chapter 01', | ||
}, | ||
entry: { | ||
index: 0, | ||
size: 747_486, | ||
type: 'image/webp' | ||
} | ||
}; | ||
|
||
new TestFixture(config).AssertWebsite(); |
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