Skip to content

Commit

Permalink
Imagebam ripper fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
joroto committed May 22, 2024
1 parent 6977025 commit 81533d4
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -128,7 +131,12 @@ public void run() {
*/
private void fetchImage() {
try {
Document doc = Http.url(url).get();
Map<String, String> cookies = new HashMap<>();
cookies.put("nsfw_inter", "1");
Document doc = Jsoup.connect(url.toString())
.cookies(cookies)
.get();

// Find image
Elements metaTags = doc.getElementsByTag("meta");

Expand Down

0 comments on commit 81533d4

Please sign in to comment.