fix(furaffinity): detected non-tag elements as tags when logged in
when logged in there are "block tag" elements, which are empty, but still get recognized as tags. example element, which was previously detected: ``` <a class="tag-block add-tag" href="javascript:void(0);" data-tag-name="cute" title="Click to add this tag to the blocklist!"></a> ``` (the text gets filled via `::after`, so it is empty)pull/21/head
parent
51be6dfdcd
commit
bc300601e0
|
|
@ -47,7 +47,7 @@ export default class FurAffinity extends ScrapeEngineBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set tags
|
// Set tags
|
||||||
post.tags = Array.from(document.querySelectorAll("section.tags-row > span.tags a"))
|
post.tags = Array.from(document.querySelectorAll("section.tags-row > span.tags a:not(.tag-block)"))
|
||||||
.map((x) => (x as HTMLSpanElement).innerText)
|
.map((x) => (x as HTMLSpanElement).innerText)
|
||||||
.map((x) => new ScrapedTag(x));
|
.map((x) => new ScrapedTag(x));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue