From 67821fb311ec82ec2528cc492fe69eaecb1dc2ba Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 16 May 2018 15:21:34 -0400 Subject: [PATCH 1/2] Added quick queue support for 8muses.download --- .../ripper/rippers/WordpressComicRipper.java | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java index 8b7b7b80..adcc7360 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java @@ -160,12 +160,54 @@ public class WordpressComicRipper extends AbstractHTMLRipper { if (spyingwithlanaMat.matches()) { return true; } + + Pattern pa = Pattern.compile("^https?://8muses.download/\\?s=([a-zA-Z0-9-]*)"); + Matcher ma = pa.matcher(url.toExternalForm()); + if (ma.matches()) { + return true; + } + + Pattern pat = Pattern.compile("https?://8muses.download/page/\\d+/\\?s=([a-zA-Z0-9-]*)"); + Matcher mat = pat.matcher(url.toExternalForm()); + if (mat.matches()) { + return true; + } } return false; } + @Override + public boolean hasQueueSupport() { + return true; + } + + @Override + public boolean pageContainsAlbums(URL url) { + Pattern pa = Pattern.compile("^https?://8muses.download/\\?s=([a-zA-Z0-9-]*)"); + Matcher ma = pa.matcher(url.toExternalForm()); + if (ma.matches()) { + return true; + } + + Pattern pat = Pattern.compile("https?://8muses.download/page/\\d+/\\?s=([a-zA-Z0-9-]*)"); + Matcher mat = pat.matcher(url.toExternalForm()); + if (mat.matches()) { + return true; + } + return false; + } + + @Override + public List getAlbumsToQueue(Document doc) { + List urlsToAddToQueue = new ArrayList<>(); + for (Element elem : doc.select("#post_masonry > article > div > figure > a")) { + urlsToAddToQueue.add(elem.attr("href")); + } + return urlsToAddToQueue; + } + @Override public String getAlbumTitle(URL url) throws MalformedURLException { Pattern totempole666Pat = Pattern.compile("(?:https?://)?(?:www\\.)?totempole666.com/comic/([a-zA-Z0-9_-]*)/?$"); From e541d1cba0e20ece318e45e8ee54e0c075c1db73 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 16 May 2018 15:32:18 -0400 Subject: [PATCH 2/2] Added quick queue support for 8muses.download --- .../ripme/ripper/rippers/WordpressComicRipper.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java index adcc7360..31509734 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/WordpressComicRipper.java @@ -172,6 +172,12 @@ public class WordpressComicRipper extends AbstractHTMLRipper { if (mat.matches()) { return true; } + + pat = Pattern.compile("https://8muses.download/category/([a-zA-Z0-9-]*)/?"); + mat = pat.matcher(url.toExternalForm()); + if (mat.matches()) { + return true; + } } @@ -196,6 +202,13 @@ public class WordpressComicRipper extends AbstractHTMLRipper { if (mat.matches()) { return true; } + + pat = Pattern.compile("https://8muses.download/category/([a-zA-Z0-9-]*)/?"); + mat = pat.matcher(url.toExternalForm()); + if (mat.matches()) { + return true; + } + return false; }