-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
65 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,42 @@ | ||
import { Tags } from '../Tags'; | ||
import icon from './Pururin.webp'; | ||
import { DecoratableMangaScraper } from '../providers/MangaPlugin'; | ||
import * as Common from './decorators/Common'; | ||
|
||
const pageScript = ` | ||
new Promise (resolve => { | ||
const element = document.querySelector('.img-viewer'); | ||
const imgdata = JSON.parse(element.dataset['img']); | ||
resolve( imgdata.images.map( image => new URL( [imgdata.directory, image.filename].join('/'), element.dataset.svr).href)); | ||
}) | ||
`; | ||
|
||
function MangaInfoExTractor(anchor: HTMLAnchorElement) { | ||
return { | ||
id: anchor.pathname, | ||
title: anchor.querySelector<HTMLImageElement>('img.card-img-top').getAttribute('alt').trim() | ||
}; | ||
} | ||
|
||
function ChapterExtractor(element: HTMLDivElement) { | ||
return { | ||
id: element.querySelector<HTMLAnchorElement>('div.cover-wrapper a').pathname, | ||
title: element.querySelector<HTMLSpanElement>('div.title h1 span').textContent.trim() | ||
}; | ||
} | ||
|
||
@Common.MangaCSS(/^{origin}\/gallery\/\d+\//, 'div.title h1 span') | ||
@Common.MangasMultiPageCSS('/?page={page}', 'a.card.card-gallery', 1, 1, 0, MangaInfoExTractor) | ||
@Common.ChaptersSinglePageCSS('div.gallery-wrapper', ChapterExtractor) | ||
@Common.PagesSinglePageJS(pageScript, 1500) | ||
@Common.ImageAjax() | ||
export default class extends DecoratableMangaScraper { | ||
|
||
public constructor() { | ||
super('pururin', `Pururin`, 'https://pururin.me', Tags.Language.English, Tags.Media.Manga, Tags.Source.Aggregator, Tags.Rating.Pornographic); | ||
} | ||
|
||
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,22 @@ | ||
import { TestFixture } from '../../../test/WebsitesFixture'; | ||
|
||
new TestFixture({ | ||
plugin: { | ||
id: 'pururin', | ||
title: 'Pururin' | ||
}, | ||
container: { | ||
url: 'https://pururin.me/gallery/65780/the-rough-tempered-big-breasted-pirate-whos-addicted-to-sex', | ||
id: '/gallery/65780/the-rough-tempered-big-breasted-pirate-whos-addicted-to-sex', | ||
title: 'The Rough Tempered Big Breasted Pirate Who\'s Addicted To Sex / 気性が荒い爆乳海賊はえっちにハマる' | ||
}, | ||
child: { | ||
id: '/read/65780/01/the-rough-tempered-big-breasted-pirate-whos-addicted-to-sex', | ||
title: `The Rough Tempered Big Breasted Pirate Who's Addicted To Sex / 気性が荒い爆乳海賊はえっちにハマる` | ||
}, | ||
entry: { | ||
index: 0, | ||
size: 1_775_122, | ||
type: 'image/jpeg' | ||
} | ||
}).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