Set user who submitted the art as the artists on furaffinity
parent
d127ec755b
commit
73ffee047e
|
|
@ -7,6 +7,7 @@ test("get furaffinity.net post 23281942", async () => {
|
|||
expect(res.posts[0]).toHaveTag("zac");
|
||||
expect(res.posts[0]).toHaveTag("riven");
|
||||
expect(res.posts[0]).toHaveTag("pool");
|
||||
expect(res.posts[0]).toHaveTag("nielsdejong", "artist");
|
||||
expect(res.posts[0]).toHaveResolution([1280, 1279]);
|
||||
expect(res.posts[0].pageUrl).toBe(pageUrl);
|
||||
expect(res.posts[0].contentUrl).toBe(
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ export default class FurAffinity extends ScrapeEngineBase {
|
|||
.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 > strong")?.innerText;
|
||||
if (submissionUser) {
|
||||
post.tags.push(new ScrapedTag(submissionUser, "artist"));
|
||||
}
|
||||
|
||||
result.tryAddPost(post);
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue