From: David ‘Bombe’ Roden Date: Sun, 20 Sep 2020 11:22:20 +0000 (+0200) Subject: 🐛 Fix QC filter X-Git-Tag: v2~89 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e426b888068677738269eb378c24a6f62db3614d;p=rhynodge.git 🐛 Fix QC filter --- 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