From 82bf98178e1e101753ed91be21451abee390c38d Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 23 Aug 2018 19:16:12 -0400 Subject: [PATCH 1/3] Fixed GfycatRipper --- .../java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java index 44ff857d..086ea069 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java @@ -73,7 +73,7 @@ public class GfycatRipper extends AbstractSingleFileRipper { @Override public List getURLsFromPage(Document doc) { List result = new ArrayList<>(); - Elements videos = doc.select("source#mp4Source"); + Elements videos = doc.select("source"); String vidUrl = videos.first().attr("src"); if (vidUrl.startsWith("//")) { vidUrl = "http:" + vidUrl; From 4f5a8b22aa15aad3b8cf05419086e14007457307 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 23 Aug 2018 19:16:32 -0400 Subject: [PATCH 2/3] Renamed GfycatRipperTest unit tests --- .../rarchives/ripme/tst/ripper/rippers/GfycatRipperTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/GfycatRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/GfycatRipperTest.java index d3d011be..4c560c3e 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/GfycatRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/GfycatRipperTest.java @@ -11,7 +11,7 @@ public class GfycatRipperTest extends RippersTest { * Rips correctly formatted URL directly from Gfycat * @throws IOException */ - public void GfycatGoodURL() throws IOException{ + public void testGfycatGoodURL() throws IOException{ GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/TemptingExcellentIchthyosaurs")); testRipper(ripper); } @@ -19,7 +19,7 @@ public class GfycatRipperTest extends RippersTest { * Rips badly formatted URL directly from Gfycat * @throws IOException */ - public void GfycatBadURL() throws IOException { + public void testGfycatBadURL() throws IOException { GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/gifs/detail/limitedtestyamericancrow")); testRipper(ripper); } From d6b4375a75076737f36a44e692565881fb67d277 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 23 Aug 2018 19:33:06 -0400 Subject: [PATCH 3/3] Fixed GfycatRipper --- .../java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java index 086ea069..9c2db859 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/GfycatRipper.java @@ -95,9 +95,9 @@ public class GfycatRipper extends AbstractSingleFileRipper { url = new URL(url.toExternalForm().replace("/gifs/detail", "")); Document doc = Http.url(url).get(); - Elements videos = doc.select("source#mp4Source"); + Elements videos = doc.select("source"); if (videos.isEmpty()) { - throw new IOException("Could not find source#mp4source at " + url); + throw new IOException("Could not find source at " + url); } String vidUrl = videos.first().attr("src"); if (vidUrl.startsWith("//")) {