1.0.79 - Support for ripping all images from cheeby

This commit is contained in:
4pr0n 2014-07-21 03:02:19 -07:00
parent aa296ef72e
commit 763a7445bf
3 changed files with 18 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.rarchives.ripme</groupId>
<artifactId>ripme</artifactId>
<packaging>jar</packaging>
<version>1.0.78</version>
<version>1.0.79</version>
<name>ripme</name>
<url>http://rip.rarchives.com</url>
<properties>

View File

@ -16,6 +16,8 @@ import com.rarchives.ripme.utils.Http;
public class CheebyRipper extends AbstractHTMLRipper {
private int offset = 0;
public CheebyRipper(URL url) throws IOException {
super(url);
}
@ -46,10 +48,23 @@ public class CheebyRipper extends AbstractHTMLRipper {
@Override
public Document getFirstPage() throws IOException {
return Http.url(this.url)
String url = this.url + "?limit=10&offset=0";
return Http.url(url)
.get();
}
@Override
public Document getNextPage(Document doc) throws IOException {
sleep(500);
offset += 10;
String url = this.url + "?limit=10&offset=" + offset;
Document nextDoc = Http.url(url).get();
if (nextDoc.select("div.i a img").size() == 0) {
throw new IOException("No more images to fetch");
}
return nextDoc;
}
@Override
public List<String> getURLsFromPage(Document page) {
List<String> imageURLs = new ArrayList<String>();

View File

@ -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.78";
private static final String DEFAULT_VERSION = "1.0.79";
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";