From 78266e647b7bc441d59b00de76b0d69d1ecb86d6 Mon Sep 17 00:00:00 2001 From: Shae Date: Sat, 11 Oct 2025 03:56:59 +0200 Subject: [PATCH] fix(furaffinity): duplicate tag-name if a artist uses their name as tag some artists tag themselves, resulting in duplicate tags. i have not yet found a consistency, but sometimes duplicate tags cause szuruchrome to refuse uploading it (even for the same post it often works by just re-trying). --- src/engines/FurAffinity.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engines/FurAffinity.ts b/src/engines/FurAffinity.ts index 6d2a090..344195b 100644 --- a/src/engines/FurAffinity.ts +++ b/src/engines/FurAffinity.ts @@ -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:not(.tag-block)")) - .map((x) => (x as HTMLSpanElement).innerText) - .map((x) => new ScrapedTag(x)); - // Set user who submitted the art as the artist const submissionUser = document.querySelector(".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);