1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-27 15:49:50 +02:00

Ripper now uses https

This commit is contained in:
cyian-1756
2019-03-19 11:36:17 -04:00
parent 6590b3b80a
commit 0189b37f04

View File

@@ -10,6 +10,7 @@ import java.util.Map;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import com.rarchives.ripme.utils.Utils;
import org.jsoup.Connection.Method; import org.jsoup.Connection.Method;
import org.jsoup.Connection.Response; import org.jsoup.Connection.Response;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
@@ -53,8 +54,8 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
Response resp; Response resp;
Document doc; Document doc;
resp = Http.url("http://www.hentai-foundry.com/?enterAgree=1&size=1500") resp = Http.url("https://www.hentai-foundry.com/?enterAgree=1&size=1500")
.referrer("http://www.hentai-foundry.com/") .referrer("https://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 // The only cookie that seems to matter in getting around the age wall is the phpsession cookie
@@ -86,11 +87,11 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
data.put("rating_incest" , "1"); data.put("rating_incest" , "1");
data.put("rating_rape" , "1"); data.put("rating_rape" , "1");
data.put("filter_media" , "A"); data.put("filter_media" , "A");
data.put("filter_order" , "date_new"); data.put("filter_order" , Utils.getConfigString("hentai-foundry.filter_order","date_old"));
data.put("filter_type" , "0"); data.put("filter_type" , "0");
resp = Http.url("http://www.hentai-foundry.com/site/filters") resp = Http.url("https://www.hentai-foundry.com/site/filters")
.referrer("http://www.hentai-foundry.com/") .referrer("https://www.hentai-foundry.com/")
.cookies(cookies) .cookies(cookies)
.data(data) .data(data)
.method(Method.POST) .method(Method.POST)
@@ -102,7 +103,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
} }
resp = Http.url(url) resp = Http.url(url)
.referrer("http://www.hentai-foundry.com/") .referrer("https://www.hentai-foundry.com/")
.cookies(cookies) .cookies(cookies)
.response(); .response();
cookies.putAll(resp.cookies()); cookies.putAll(resp.cookies());
@@ -119,7 +120,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
Element first = els.first(); Element first = els.first();
try { try {
String nextURL = first.attr("href"); String nextURL = first.attr("href");
nextURL = "http://www.hentai-foundry.com" + nextURL; nextURL = "https://www.hentai-foundry.com" + nextURL;
return Http.url(nextURL) return Http.url(nextURL)
.referrer(url) .referrer(url)
.cookies(cookies) .cookies(cookies)
@@ -136,7 +137,7 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
if (url.toExternalForm().contains("/stories/")) { if (url.toExternalForm().contains("/stories/")) {
for (Element pdflink : doc.select("a.pdfLink")) { for (Element pdflink : doc.select("a.pdfLink")) {
LOGGER.info("grabbing " + "http://www.hentai-foundry.com" + pdflink.attr("href")); LOGGER.info("grabbing " + "http://www.hentai-foundry.com" + pdflink.attr("href"));
imageURLs.add("http://www.hentai-foundry.com" + pdflink.attr("href")); imageURLs.add("https://www.hentai-foundry.com" + pdflink.attr("href"));
} }
return imageURLs; return imageURLs;
} }
@@ -153,8 +154,8 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
Document imagePage; Document imagePage;
try { try {
LOGGER.info("grabbing " + "http://www.hentai-foundry.com" + thumb.attr("href")); LOGGER.info("grabbing " + "https://www.hentai-foundry.com" + thumb.attr("href"));
imagePage = Http.url("http://www.hentai-foundry.com" + thumb.attr("href")).cookies(cookies).get(); imagePage = Http.url("https://www.hentai-foundry.com" + thumb.attr("href")).cookies(cookies).get();
} }
catch (IOException e) { catch (IOException e) {