Fix for ehentai restricted galleries for #57
This commit is contained in:
parent
5d319355d3
commit
e88d00ddee
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>com.rarchives.ripme</groupId>
|
||||
<artifactId>ripme</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0.57</version>
|
||||
<version>1.0.58</version>
|
||||
<name>ripme</name>
|
||||
<url>http://rip.rarchives.com</url>
|
||||
<properties>
|
||||
|
@ -43,17 +43,7 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
}
|
||||
|
||||
public URL sanitizeURL(URL url) throws MalformedURLException {
|
||||
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);
|
||||
return url;
|
||||
}
|
||||
|
||||
public String getAlbumTitle(URL url) throws MalformedURLException {
|
||||
@ -64,6 +54,8 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
sendUpdate(STATUS.LOADING_RESOURCE, url.toString());
|
||||
albumDoc = Jsoup.connect(url.toExternalForm())
|
||||
.userAgent(USER_AGENT)
|
||||
.cookie("nw", "1")
|
||||
.cookie("tip", "1")
|
||||
.timeout(5000)
|
||||
.get();
|
||||
}
|
||||
@ -106,6 +98,7 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
sendUpdate(STATUS.LOADING_RESOURCE, nextUrl);
|
||||
albumDoc = Jsoup.connect(nextUrl)
|
||||
.userAgent(USER_AGENT)
|
||||
.cookie("nw", "1")
|
||||
.timeout(5000)
|
||||
.referrer(this.url.toExternalForm())
|
||||
.get();
|
||||
@ -211,6 +204,7 @@ public class EHentaiRipper extends AlbumRipper {
|
||||
try {
|
||||
Document doc = Jsoup.connect(this.url.toExternalForm())
|
||||
.userAgent(USER_AGENT)
|
||||
.cookie("nw", "1")
|
||||
.timeout(5000)
|
||||
.referrer(this.url.toExternalForm())
|
||||
.get();
|
||||
|
@ -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.57";
|
||||
private static final String DEFAULT_VERSION = "1.0.58";
|
||||
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