parent
3407ae2a8c
commit
4c0c790c0c
|
|
@ -5,7 +5,15 @@ export default class Philomena extends ScrapeEngineBase {
|
|||
name = "Philomena";
|
||||
features: ScrapeEngineFeature[] = ["content", "rating", "tags", "source"];
|
||||
notes = [];
|
||||
supportedHosts = ["derpibooru.org", "trixiebooru.org", "ponybooru.org", "furbooru.org", "ponerpics.org", "manebooru.art", "twibooru.org"];
|
||||
supportedHosts = [
|
||||
"derpibooru.org",
|
||||
"trixiebooru.org",
|
||||
"ponybooru.org",
|
||||
"furbooru.org",
|
||||
"ponerpics.org",
|
||||
"manebooru.art",
|
||||
"twibooru.org",
|
||||
];
|
||||
|
||||
scrapeDocument(document: Document): ScrapeResult {
|
||||
const result = new ScrapeResult(this.name);
|
||||
|
|
@ -13,7 +21,9 @@ export default class Philomena extends ScrapeEngineBase {
|
|||
post.pageUrl = document.location.href;
|
||||
|
||||
// Set image url
|
||||
const downloadEl = document.querySelector("div[id^='image_meta_'] > div:nth-child(4) > a:nth-child(4)") as HTMLAnchorElement;
|
||||
const downloadEl = document.querySelector(
|
||||
"div[id^='image_meta_'] > div:nth-child(4) > a:nth-child(4)"
|
||||
) as HTMLAnchorElement;
|
||||
post.contentUrl = downloadEl?.href;
|
||||
|
||||
// Set content type
|
||||
|
|
@ -28,7 +38,7 @@ export default class Philomena extends ScrapeEngineBase {
|
|||
const tagEls = Array.from(document.querySelectorAll("a.tag__name")).map((x) => x as HTMLLIElement);
|
||||
|
||||
for (const el of tagEls) {
|
||||
const tagName = (el.innerText);
|
||||
const tagName = el.innerText;
|
||||
let category: TagCategory | undefined;
|
||||
|
||||
// Set rating (philomena uses tags for this)
|
||||
|
|
|
|||
Loading…
Reference in New Issue