From 3f8349a018704f8362c43937fb9274c1418521ed Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 2 Jan 2018 21:30:53 -0500 Subject: [PATCH] instagram ripper can now be made to skip videos --- .../rarchives/ripme/ripper/rippers/InstagramRipper.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java index 0352e982..ec7825e9 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java @@ -19,6 +19,8 @@ import com.rarchives.ripme.utils.Http; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; +import com.rarchives.ripme.ui.RipStatusMessage; +import com.rarchives.ripme.utils.Utils; public class InstagramRipper extends AbstractHTMLRipper { @@ -234,7 +236,11 @@ public class InstagramRipper extends AbstractHTMLRipper { } addURLToDownload(new URL(getOriginalUrl(data.getString("thumbnail_src"))), image_date); } else { - addURLToDownload(new URL(getVideoFromPage(data.getString("code"))), image_date); + if (!Utils.getConfigBoolean("instagram.download_images_only", false)) { + addURLToDownload(new URL(getVideoFromPage(data.getString("code"))), image_date); + } else { + sendUpdate(RipStatusMessage.STATUS.DOWNLOAD_WARN, "Skipping video " + data.getString("code")); + } } } catch (MalformedURLException e) { return imageURLs;