Add rule34hentai.net
parent
8cd94d53b6
commit
c55d10d7e5
|
|
@ -4,7 +4,10 @@ export default class Shimmie2 implements ScrapeEngine {
|
||||||
name = "shimmie2";
|
name = "shimmie2";
|
||||||
|
|
||||||
canImport(url: Location): boolean {
|
canImport(url: Location): boolean {
|
||||||
return url.host == "rule34.paheal.net";
|
return (
|
||||||
|
url.host == "rule34.paheal.net" ||
|
||||||
|
url.host == "rule34hentai.net"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
scrapeDocument(document: Document): ScrapeResult {
|
scrapeDocument(document: Document): ScrapeResult {
|
||||||
|
|
@ -19,6 +22,11 @@ export default class Shimmie2 implements ScrapeEngine {
|
||||||
|
|
||||||
if (originalImageElements.length > 0) {
|
if (originalImageElements.length > 0) {
|
||||||
post.imageUrl = originalImageElements[0].href;
|
post.imageUrl = originalImageElements[0].href;
|
||||||
|
} else {
|
||||||
|
const dowloadBtnEl = document.querySelector("a[download]") as HTMLAnchorElement;
|
||||||
|
if (dowloadBtnEl) {
|
||||||
|
post.imageUrl = dowloadBtnEl.href;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set safety
|
// Set safety
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue