From b7c4a25f7e3584a5baa47f8799ca0d2aa38f9496 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 6 Jun 2018 11:34:16 -0400 Subject: [PATCH 1/3] Removed questionable code which caused ripme to assume all sites with '/thread/ and '/res/' in the url are chans --- .../java/com/rarchives/ripme/ripper/rippers/ChanRipper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java index ace305c1..3a137123 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java @@ -85,8 +85,7 @@ public class ChanRipper extends AbstractHTMLRipper { return true; } } - return url.toExternalForm().contains("/res/") // Most chans - || url.toExternalForm().contains("/thread/"); // 4chan, archive.moe + return false; } /** From 8ea588a4a5f98e4722791c225a56a6a0197cbfe0 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 6 Jun 2018 11:35:39 -0400 Subject: [PATCH 2/3] Added support for new 4chan cdn domain --- .../java/com/rarchives/ripme/ripper/rippers/ChanRipper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java index 3a137123..be0a4cf5 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java @@ -19,7 +19,7 @@ import com.rarchives.ripme.utils.RipUtils; public class ChanRipper extends AbstractHTMLRipper { private static List explicit_domains = Arrays.asList( - new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org")), + new ChanSite(Arrays.asList("boards.4chan.org"), Arrays.asList("4cdn.org", "is.4chan.org", "is2.4chan.org", "is3.4chan.org")), new ChanSite(Arrays.asList("4archive.org"), Arrays.asList("imgur.com")), new ChanSite(Arrays.asList("archive.4plebs.org"), Arrays.asList("img.4plebs.org")) ); From dad016e5be63041d4680027c3c9e4e8053f87301 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 7 Jun 2018 05:08:09 -0400 Subject: [PATCH 3/3] Readded support desuchan.net --- .../java/com/rarchives/ripme/ripper/rippers/ChanRipper.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java index be0a4cf5..33725f39 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java @@ -85,6 +85,9 @@ public class ChanRipper extends AbstractHTMLRipper { return true; } } + if (url.toExternalForm().contains("desuchan.net") && url.toExternalForm().contains("/res/")) { + return true; + } return false; }