From e426b888068677738269eb378c24a6f62db3614d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 20 Sep 2020 13:22:20 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=90=9B=20Fix=20QC=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../rhynodge/filters/comics/QuestionableContentComicFilter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/comics/QuestionableContentComicFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/comics/QuestionableContentComicFilter.java index abdcb39..5faf660 100644 --- a/src/main/java/net/pterodactylus/rhynodge/filters/comics/QuestionableContentComicFilter.java +++ b/src/main/java/net/pterodactylus/rhynodge/filters/comics/QuestionableContentComicFilter.java @@ -25,7 +25,9 @@ import net.pterodactylus.rhynodge.filters.ComicSiteFilter; import com.google.common.base.Optional; import org.jsoup.nodes.Document; -import org.jsoup.select.Elements; +import org.jsoup.nodes.Element; + +import static java.util.Collections.singletonList; /** * {@link ComicSiteFilter} implementation that can parse Questionable Content. @@ -41,8 +43,8 @@ public class QuestionableContentComicFilter extends ComicSiteFilter { @Override protected List extractImageUrls(Document document) { - Elements imageTag = document.select("#strip"); - return imageTag.hasAttr("src") ? Arrays.asList(imageTag.attr("src")) : Collections.emptyList(); + Element firstComicNav = document.select("#comicnav").first(); + return singletonList(firstComicNav.nextSibling().nextSibling().attr("src")); } @Override -- 2.7.4