parent
574b03e45e
commit
6c90522693
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>com.rarchives.ripme</groupId>
|
||||
<artifactId>ripme</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.54</version>
|
||||
<version>1.0.55</version>
|
||||
<name>ripme</name>
|
||||
<url>http://rip.rarchives.com</url>
|
||||
<properties>
|
||||
|
@ -43,7 +43,17 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
}
|
||||
|
||||
public URL sanitizeURL(URL url) throws MalformedURLException {
|
||||
return url;
|
||||
String u = url.toExternalForm();
|
||||
if (u.contains("nw=session")) {
|
||||
return url;
|
||||
}
|
||||
else if (u.contains("?")) {
|
||||
u += "&nw=session";
|
||||
}
|
||||
else {
|
||||
u += "?nw=session";
|
||||
}
|
||||
return new URL(u);
|
||||
}
|
||||
|
||||
public String getAlbumTitle(URL url) throws MalformedURLException {
|
||||
@ -88,6 +98,9 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
int index = 0, retries = 3;
|
||||
String nextUrl = this.url.toExternalForm();
|
||||
while (true) {
|
||||
if (isStopped()) {
|
||||
break;
|
||||
}
|
||||
if (albumDoc == null) {
|
||||
logger.info(" Retrieving album page " + nextUrl);
|
||||
sendUpdate(STATUS.LOADING_RESOURCE, nextUrl);
|
||||
@ -123,6 +136,9 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
}
|
||||
// Iterate over images on page
|
||||
for (Element thumb : thumbs) {
|
||||
if (isStopped()) {
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
EHentaiImageThread t = new EHentaiImageThread(new URL(thumb.attr("href")), index, this.workingDir);
|
||||
ehentaiThreadPool.addThread(t);
|
||||
@ -132,6 +148,10 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
logger.warn("Interrupted while waiting to load next image", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (isStopped()) {
|
||||
break;
|
||||
}
|
||||
// Find next page
|
||||
Elements hrefs = albumDoc.select(".ptt a");
|
||||
if (hrefs.size() == 0) {
|
||||
|
@ -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.54";
|
||||
private static final String DEFAULT_VERSION = "1.0.55";
|
||||
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";
|
||||
|
Loading…
Reference in New Issue
Block a user