From d127ec755b4b9b718508ce4b2cba66e900b6022d Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Tue, 9 Aug 2022 18:08:18 +0200 Subject: [PATCH] Fix broken tag names when logged into moebooru site --- src/engines/Moebooru.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/engines/Moebooru.ts b/src/engines/Moebooru.ts index ff45163..606c66e 100644 --- a/src/engines/Moebooru.ts +++ b/src/engines/Moebooru.ts @@ -67,8 +67,10 @@ export default class Moebooru extends ScrapeEngineBase { if (tagNameElements.length > 1) { // First is "?" - // Second is "actual_tag_name" - tagName = tagNameElements[1].innerText; + // (opt) Second is "+" (when logged in) + // (opt) Third is "-" (when logged in) + // Last is the actual tag name + tagName = tagNameElements[tagNameElements.length - 1].innerText; } else { // Skip if no tag name is found continue;