From debba69c7f3cf03ecdd4c1b486e8b223614866c2 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 28 Oct 2018 07:54:49 -0400 Subject: [PATCH] Fixed error where on 403 reddit ripper would try to download a null url --- .../com/rarchives/ripme/ripper/rippers/RedditRipper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/RedditRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/RedditRipper.java index 20d31d78..172250e3 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/RedditRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/RedditRipper.java @@ -249,7 +249,10 @@ public class RedditRipper extends AlbumRipper { if (url.contains("v.redd.it")) { String savePath = this.workingDir + File.separator; savePath += id + "-" + url.split("/")[3] + title + ".mp4"; - addURLToDownload(parseRedditVideoMPD(urls.get(0).toExternalForm()), new File(savePath)); + URL urlToDownload = parseRedditVideoMPD(urls.get(0).toExternalForm()); + if (urlToDownload != null) { + addURLToDownload(urlToDownload, new File(savePath)); + } } else { addURLToDownload(urls.get(0), id + title, "", theUrl, null);