Attempt to 'prettier' code

* Hopefully this is 'prettier'
pull/15/head
GlobalGit3 2023-07-01 14:24:08 -05:00
parent 3407ae2a8c
commit 4c0c790c0c
2 changed files with 35 additions and 25 deletions

View File

@ -5,7 +5,15 @@ export default class Philomena extends ScrapeEngineBase {
name = "Philomena"; name = "Philomena";
features: ScrapeEngineFeature[] = ["content", "rating", "tags", "source"]; features: ScrapeEngineFeature[] = ["content", "rating", "tags", "source"];
notes = []; 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 { scrapeDocument(document: Document): ScrapeResult {
const result = new ScrapeResult(this.name); const result = new ScrapeResult(this.name);
@ -13,7 +21,9 @@ export default class Philomena extends ScrapeEngineBase {
post.pageUrl = document.location.href; post.pageUrl = document.location.href;
// Set image url // 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; post.contentUrl = downloadEl?.href;
// Set content type // 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); const tagEls = Array.from(document.querySelectorAll("a.tag__name")).map((x) => x as HTMLLIElement);
for (const el of tagEls) { for (const el of tagEls) {
const tagName = (el.innerText); const tagName = el.innerText;
let category: TagCategory | undefined; let category: TagCategory | undefined;
// Set rating (philomena uses tags for this) // Set rating (philomena uses tags for this)