From e9c802703511ae79de47181cae85c15dddaa9066 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 29 Aug 2018 18:15:54 -0400 Subject: [PATCH] getFilesFromURL now can handle imgur videos --- src/main/java/com/rarchives/ripme/utils/RipUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/utils/RipUtils.java b/src/main/java/com/rarchives/ripme/utils/RipUtils.java index e7ffce65..f0752c06 100644 --- a/src/main/java/com/rarchives/ripme/utils/RipUtils.java +++ b/src/main/java/com/rarchives/ripme/utils/RipUtils.java @@ -149,7 +149,11 @@ public class RipUtils { .userAgent(AbstractRipper.USER_AGENT) .get(); for (Element el : doc.select("meta")) { - if (el.attr("name").equals("twitter:image:src")) { + if (el.attr("property").equals("og:video")) { + result.add(new URL(el.attr("content"))); + return result; + } + else if (el.attr("name").equals("twitter:image:src")) { result.add(new URL(el.attr("content"))); return result; }