1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-29 16:50:10 +02:00

Fixed error where on 403 reddit ripper would try to download a null url

This commit is contained in:
cyian-1756
2018-10-28 07:54:49 -04:00
parent 28eac1506d
commit debba69c7f

View File

@@ -249,7 +249,10 @@ public class RedditRipper extends AlbumRipper {
if (url.contains("v.redd.it")) { if (url.contains("v.redd.it")) {
String savePath = this.workingDir + File.separator; String savePath = this.workingDir + File.separator;
savePath += id + "-" + url.split("/")[3] + title + ".mp4"; 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 { else {
addURLToDownload(urls.get(0), id + title, "", theUrl, null); addURLToDownload(urls.get(0), id + title, "", theUrl, null);