From dbe39a89b85192debe3d32bac390adcdac8924d3 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sat, 16 Dec 2017 00:13:35 -0500 Subject: [PATCH] Forced https for tumblr image links --- .../java/com/rarchives/ripme/ripper/rippers/TumblrRipper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/TumblrRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/TumblrRipper.java index d6188a75..5a22b834 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/TumblrRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/TumblrRipper.java @@ -192,7 +192,7 @@ public class TumblrRipper extends AlbumRipper { for (int j = 0; j < photos.length(); j++) { photo = photos.getJSONObject(j); try { - fileURL = new URL(photo.getJSONObject("original_size").getString("url")); + fileURL = new URL(photo.getJSONObject("original_size").getString("url").replaceAll("http", "https")); m = p.matcher(fileURL.toString()); if (m.matches()) { addURLToDownload(fileURL); @@ -206,7 +206,7 @@ public class TumblrRipper extends AlbumRipper { } } else if (post.has("video_url")) { try { - fileURL = new URL(post.getString("video_url")); + fileURL = new URL(post.getString("video_url").replaceAll("http", "https")); addURLToDownload(fileURL); } catch (Exception e) { logger.error("[!] Error while parsing video in " + post, e);