From 44c1073dcadb928e5101541315f6ac3c74137e55 Mon Sep 17 00:00:00 2001 From: 4pr0n Date: Sat, 2 Aug 2014 20:16:11 -0700 Subject: [PATCH] Fix photobucket ripper Closes #95 --- .../com/rarchives/ripme/ripper/rippers/PhotobucketRipper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/PhotobucketRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/PhotobucketRipper.java index ce425943..c6c8885c 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/PhotobucketRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/PhotobucketRipper.java @@ -130,7 +130,7 @@ public class PhotobucketRipper extends AlbumRipper { } pageIndex++; if (pageIndex > 1 || pageResponse == null) { - url = theUrl + String.format("?sort=3&page=", pageIndex); + url = theUrl + String.format("?sort=3&page=%d", pageIndex); logger.info(" Retrieving " + url); pageResponse = Http.url(url).response(); } @@ -139,10 +139,10 @@ public class PhotobucketRipper extends AlbumRipper { String jsonString = null; for (Element script : albumDoc.select("script[type=text/javascript]")) { String data = script.data(); + // Ensure this chunk of javascript contains the album info if (!data.contains("libraryAlbumsPageCollectionData")) { continue; } - // Ensure this chunk of javascript contains the album info // Grab the JSON Pattern p; Matcher m; p = Pattern.compile("^.*collectionData: (\\{.*\\}).*$", Pattern.DOTALL);