From 81533d4b12c2d181dcd10c805365a6b3ebbbfbc3 Mon Sep 17 00:00:00 2001 From: joroto Date: Thu, 23 May 2024 02:03:35 +0300 Subject: [PATCH] Imagebam ripper fixed --- .../rarchives/ripme/ripper/rippers/ImagebamRipper.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagebamRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagebamRipper.java index 596680ddc..0699273f1 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ImagebamRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ImagebamRipper.java @@ -10,11 +10,14 @@ import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; +import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; @@ -128,7 +131,12 @@ public void run() { */ private void fetchImage() { try { - Document doc = Http.url(url).get(); + Map cookies = new HashMap<>(); + cookies.put("nsfw_inter", "1"); + Document doc = Jsoup.connect(url.toString()) + .cookies(cookies) + .get(); + // Find image Elements metaTags = doc.getElementsByTag("meta");