From e46e6733fa07e15ff9692739ba0fa80abd60536f Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Fri, 15 Aug 2014 22:07:59 -0700 Subject: [PATCH] 1.0.86 - Fix imagefap albums larger than 1k images Mentioned in #8 --- pom.xml | 2 +- .../com/rarchives/ripme/ripper/rippers/ImagefapRipper.java | 7 +++---- src/main/java/com/rarchives/ripme/ui/UpdateUtils.java | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 1bb04e9a..d2e52897 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.rarchives.ripme ripme jar - 1.0.85 + 1.0.86 ripme http://rip.rarchives.com diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java index 065451ad..43b0c1cb 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagefapRipper.java @@ -83,10 +83,9 @@ public class ImagefapRipper extends AbstractHTMLRipper { @Override public Document getNextPage(Document doc) throws IOException { String nextURL = null; - for (Element a : albumDoc.select("a.link3")) { + for (Element a : doc.select("a.link3")) { if (a.text().contains("next")) { - nextURL = a.attr("href"); - nextURL = "http://imagefap.com/gallery.php" + nextURL; + nextURL = "http://imagefap.com/gallery.php" + a.attr("href"); break; } } @@ -100,7 +99,7 @@ public class ImagefapRipper extends AbstractHTMLRipper { @Override public List getURLsFromPage(Document doc) { List imageURLs = new ArrayList(); - for (Element thumb : albumDoc.select("#gallery img")) { + for (Element thumb : doc.select("#gallery img")) { if (!thumb.hasAttr("src") || !thumb.hasAttr("width")) { continue; } diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index c7a267f8..20d76348 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -21,7 +21,7 @@ import com.rarchives.ripme.utils.Utils; public class UpdateUtils { private static final Logger logger = Logger.getLogger(UpdateUtils.class); - private static final String DEFAULT_VERSION = "1.0.85"; + private static final String DEFAULT_VERSION = "1.0.86"; private static final String updateJsonURL = "http://rarchives.com/ripme.json"; private static final String updateJarURL = "http://rarchives.com/ripme.jar"; private static final String mainFileName = "ripme.jar";