From cd7da59561c46edd2312ca99c1b1806e27cda088 Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Fri, 1 May 2020 13:28:54 +0200 Subject: [PATCH] e621: improve title search for pools --- src/be/nikiroo/fanfix/supported/E621.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/be/nikiroo/fanfix/supported/E621.java b/src/be/nikiroo/fanfix/supported/E621.java index 602cd363..c0125fb3 100644 --- a/src/be/nikiroo/fanfix/supported/E621.java +++ b/src/be/nikiroo/fanfix/supported/E621.java @@ -292,6 +292,22 @@ class E621 extends BasicSupport { builder.append(" ").append(tab[i]); } } + + if (builder.length() == 0) { + String url = "https://e621.net/" + getSource().getPath() + + "?page=1"; + Document page1 = DataUtil.load(Instance.getInstance().getCache() + .open(getSource(), this, false), "UTF-8", + url.toString()); + for (Element el : page1.getElementsByClass("search-tag")) { + if (el.attr("itemprop").equals("author")) { + if (builder.length() > 0) { + builder.append(", "); + } + builder.append(el.text().trim()); + } + } + } } return builder.toString(); -- 2.27.0