Only return a title if an image is found
[rhynodge.git] / src / main / java / net / pterodactylus / rhynodge / filters / comics / KevinAndKellComicFilter.java
index 8dcbed6..bd460ca 100644 (file)
@@ -29,7 +29,7 @@ import org.jsoup.nodes.Document;
 import org.jsoup.select.Elements;
 
 /**
- * TODO
+ * {@link ComicSiteFilter} implementation that can parse Kevin and Kell comics.
  *
  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
@@ -37,13 +37,13 @@ public class KevinAndKellComicFilter extends ComicSiteFilter {
 
        @Override
        protected Optional<String> extractTitle(Document document) {
-               Elements captionElements = document.select("#caption");
+               Elements captionElements = document.select("#comicstripCaption");
                return Optional.fromNullable(StringEscapeUtils.unescapeHtml4(captionElements.text()));
        }
 
        @Override
        protected List<String> extractImageUrls(Document document) {
-               Elements imageTag = document.select("#comicstrip");
+               Elements imageTag = document.select("#comicstrip img");
                return imageTag.hasAttr("src") ? Arrays.asList(imageTag.attr("src")) : Collections.<String>emptyList();
        }