Merge 78266e647b into 51be6dfdcd
commit
4034253c25
|
|
@ -46,16 +46,17 @@ export default class FurAffinity extends ScrapeEngineBase {
|
|||
break;
|
||||
}
|
||||
|
||||
// Set tags
|
||||
post.tags = Array.from(document.querySelectorAll("section.tags-row > span.tags a"))
|
||||
.map((x) => (x as HTMLSpanElement).innerText)
|
||||
.map((x) => new ScrapedTag(x));
|
||||
|
||||
// Set user who submitted the art as the artist
|
||||
const submissionUser = document.querySelector<HTMLElement>(".submission-id-sub-container a")?.innerText;
|
||||
if (submissionUser) {
|
||||
post.tags.push(new ScrapedTag(submissionUser, "artist"));
|
||||
}
|
||||
// Set tags
|
||||
post.tags = Array.from(document.querySelectorAll("section.tags-row > span.tags a:not(.tag-block)"))
|
||||
.map((x) => (x as HTMLSpanElement).innerText)
|
||||
.filter((x) => x !== submissionUser)
|
||||
.map((x) => new ScrapedTag(x));
|
||||
|
||||
|
||||
result.tryAddPost(post);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue