Merge remote-tracking branch 'refs/remotes/4pr0n/master'
This commit is contained in:
commit
d55cf06c90
8
.vscode/settings.json
vendored
Normal file
8
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"target/**": true,
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.DS_Store": true
|
||||||
|
},
|
||||||
|
"java.configuration.updateBuildConfiguration": "automatic"
|
||||||
|
}
|
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<groupId>com.rarchives.ripme</groupId>
|
<groupId>com.rarchives.ripme</groupId>
|
||||||
<artifactId>ripme</artifactId>
|
<artifactId>ripme</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>1.4.8</version>
|
<version>1.4.9</version>
|
||||||
<name>ripme</name>
|
<name>ripme</name>
|
||||||
<url>http://rip.rarchives.com</url>
|
<url>http://rip.rarchives.com</url>
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"latestVersion" : "1.4.8",
|
"latestVersion" : "1.4.9",
|
||||||
"changeList" : [
|
"changeList" : [
|
||||||
|
"1.4.9: Fixed HentaiFoundry ripper",
|
||||||
"1.4.8: Added Jagodibuja comics ripper",
|
"1.4.8: Added Jagodibuja comics ripper",
|
||||||
"1.4.7: Fixed NewsFilter, XHamster; added TheChiveRipper",
|
"1.4.7: Fixed NewsFilter, XHamster; added TheChiveRipper",
|
||||||
"1.4.6: Eroshare: get album names; Imgur: improve grabbing album name.",
|
"1.4.6: Eroshare: get album names; Imgur: improve grabbing album name.",
|
||||||
|
@ -55,6 +55,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
|
|||||||
.referrer("http://www.hentai-foundry.com/")
|
.referrer("http://www.hentai-foundry.com/")
|
||||||
.cookies(cookies)
|
.cookies(cookies)
|
||||||
.response();
|
.response();
|
||||||
|
// The only cookie that seems to matter in getting around the age wall is the phpsession cookie
|
||||||
cookies.putAll(resp.cookies());
|
cookies.putAll(resp.cookies());
|
||||||
sleep(500);
|
sleep(500);
|
||||||
resp = Http.url(url)
|
resp = Http.url(url)
|
||||||
@ -64,10 +65,10 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
|
|||||||
cookies.putAll(resp.cookies());
|
cookies.putAll(resp.cookies());
|
||||||
return resp.parse();
|
return resp.parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Document getNextPage(Document doc) throws IOException {
|
public Document getNextPage(Document doc) throws IOException {
|
||||||
if (doc.select("li.next.hidden").size() > 0) {
|
if (doc.select("li.next.hidden").size() != 0) {
|
||||||
// Last page
|
// Last page
|
||||||
throw new IOException("No more pages");
|
throw new IOException("No more pages");
|
||||||
}
|
}
|
||||||
@ -85,7 +86,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
|
|||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
List<String> imageURLs = new ArrayList<String>();
|
List<String> imageURLs = new ArrayList<String>();
|
||||||
Pattern imgRegex = Pattern.compile(".*/user/([a-zA-Z0-9\\-_]+)/(\\d+)/.*");
|
Pattern imgRegex = Pattern.compile(".*/user/([a-zA-Z0-9\\-_]+)/(\\d+)/.*");
|
||||||
for (Element thumb : doc.select("td > a:first-child")) {
|
for (Element thumb : doc.select("div.thumb_square > a.thumbLink")) {
|
||||||
if (isStopped()) {
|
if (isStopped()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -94,16 +95,36 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
|
|||||||
logger.info("Couldn't find user & image ID in " + thumb.attr("href"));
|
logger.info("Couldn't find user & image ID in " + thumb.attr("href"));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String user = imgMatcher.group(1),
|
Document imagePage;
|
||||||
imageId = imgMatcher.group(2);
|
try {
|
||||||
String image = "http://pictures.hentai-foundry.com//";
|
Response resp = Http.url("http://www.hentai-foundry.com/").response();
|
||||||
image += user.toLowerCase().charAt(0);
|
cookies = resp.cookies();
|
||||||
image += "/" + user + "/" + imageId + ".jpg";
|
resp = Http.url("http://www.hentai-foundry.com/?enterAgree=1&size=1500")
|
||||||
imageURLs.add(image);
|
.referrer("http://www.hentai-foundry.com/")
|
||||||
|
.cookies(cookies)
|
||||||
|
.response();
|
||||||
|
cookies.putAll(resp.cookies());
|
||||||
|
|
||||||
|
logger.info("grabbing " + "http://www.hentai-foundry.com" + thumb.attr("href"));
|
||||||
|
imagePage = Http.url("http://www.hentai-foundry.com" + thumb.attr("href")).cookies(cookies).get();
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (IOException e) {
|
||||||
|
logger.debug(e.getMessage());
|
||||||
|
logger.debug("Warning: imagePage is null!");
|
||||||
|
imagePage = null;
|
||||||
|
}
|
||||||
|
// This is here for when the image is resized to a thumbnail because ripme doesn't report a screensize
|
||||||
|
if (imagePage.select("div.boxbody > img.center").attr("src").contains("thumbs.") == true) {
|
||||||
|
imageURLs.add("http:" + imagePage.select("div.boxbody > img.center").attr("onclick").replace("this.src=", "").replace("'", "").replace("; $(#resize_message).hide();", ""));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
imageURLs.add("http:" + imagePage.select("div.boxbody > img.center").attr("src"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return imageURLs;
|
return imageURLs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void downloadURL(URL url, int index) {
|
public void downloadURL(URL url, int index) {
|
||||||
addURLToDownload(url, getPrefix(index));
|
addURLToDownload(url, getPrefix(index));
|
||||||
|
@ -21,7 +21,7 @@ import com.rarchives.ripme.utils.Utils;
|
|||||||
public class UpdateUtils {
|
public class UpdateUtils {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(UpdateUtils.class);
|
private static final Logger logger = Logger.getLogger(UpdateUtils.class);
|
||||||
private static final String DEFAULT_VERSION = "1.4.8";
|
private static final String DEFAULT_VERSION = "1.4.9";
|
||||||
private static final String updateJsonURL = "https://raw.githubusercontent.com/4pr0n/ripme/master/ripme.json";
|
private static final String updateJsonURL = "https://raw.githubusercontent.com/4pr0n/ripme/master/ripme.json";
|
||||||
private static final String mainFileName = "ripme.jar";
|
private static final String mainFileName = "ripme.jar";
|
||||||
private static final String updateFileName = "ripme.jar.update";
|
private static final String updateFileName = "ripme.jar.update";
|
||||||
|
Loading…
Reference in New Issue
Block a user