X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Frhynodge%2Ffilters%2Fcomics%2FSaturdayMorningBreakfastCerealComicFilter.java;h=fc5c4d97140ff8e43677a9af6bba3cdafdb1a361;hb=629c319db67a4ecae7ef345aeed4f80edd8c4e1d;hp=72e67dca8486629f14d1aaba2704f0df19416068;hpb=35ceffaab4f9b01ee4fa33f771eed38ad14f4b47;p=rhynodge.git
diff --git a/src/main/java/net/pterodactylus/rhynodge/filters/comics/SaturdayMorningBreakfastCerealComicFilter.java b/src/main/java/net/pterodactylus/rhynodge/filters/comics/SaturdayMorningBreakfastCerealComicFilter.java
index 72e67dc..fc5c4d9 100644
--- a/src/main/java/net/pterodactylus/rhynodge/filters/comics/SaturdayMorningBreakfastCerealComicFilter.java
+++ b/src/main/java/net/pterodactylus/rhynodge/filters/comics/SaturdayMorningBreakfastCerealComicFilter.java
@@ -29,7 +29,8 @@ import com.google.common.collect.FluentIterable;
import org.jsoup.nodes.Document;
/**
- * TODO
+ * {@link ComicSiteFilter} implementation that can parse Saturday Morning
+ * Breakfast Cereal.
*
* @author David âBombeâ Roden
*/
@@ -42,20 +43,15 @@ public class SaturdayMorningBreakfastCerealComicFilter extends ComicSiteFilter {
@Override
protected List extractImageUrls(Document document) {
- String imageUrl = document.select(".comicboxcenter img[usemap=#buttons] > img").attr("src");
+ String imageUrl = document.select("img#comic").get(0).attr("src");
String afterImageUrl = document.select("#aftercomic img").attr("src");
- return FluentIterable.from(Arrays.asList(imageUrl, afterImageUrl)).filter(new Predicate() {
-
- @Override
- public boolean apply(String url) {
- return url.length() > 0;
- }
- }).toList();
+ return FluentIterable.from(Arrays.asList(imageUrl, afterImageUrl)).filter(url -> url.length() > 0).toList();
}
@Override
protected List extractImageComments(Document document) {
- return Collections.emptyList();
+ String imageComment = document.select("img#comic").get(0).attr("title");
+ return Arrays.asList(imageComment, "");
}
}