From 44d71e634008b462b70a6bcaa965740955f6aab5 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 21 Feb 2017 15:39:52 -0500 Subject: [PATCH 1/2] Fixed 8muses naming issue and removed catch for unthrown error --- .../rarchives/ripme/ripper/rippers/EightmusesRipper.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java index b85d948d..3c0f1d90 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java @@ -54,7 +54,8 @@ public class EightmusesRipper extends AbstractHTMLRipper { // Attempt to use album title as GID Element titleElement = getFirstPage().select("meta[name=description]").first(); String title = titleElement.attr("content"); - title = title.substring(title.lastIndexOf('/') + 1); + title = title.replace("A huge collection of free porn comics for adults. Read", ""); + title = title.replace("online for free at 8muses.com", ""); return getHost() + "_" + title.trim(); } catch (IOException e) { // Fall back to default album naming convention @@ -122,14 +123,10 @@ public class EightmusesRipper extends AbstractHTMLRipper { } try { logger.info("Retrieving full-size image location from " + parentHref); - Thread.sleep(1000); image = getFullSizeImage(parentHref); } catch (IOException e) { logger.error("Failed to get full-size image from " + parentHref); continue; - } catch (InterruptedException e) { - logger.error("Interrupted while getting full-size image from " + parentHref); - continue; } } if (!image.contains("8muses.com")) { From 63801db2580e7a596bb94ae6faeb12b8ce234e8e Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 28 Feb 2017 02:40:16 -0500 Subject: [PATCH 2/2] Changed ripper to follow new url format --- .../com/rarchives/ripme/ripper/rippers/EightmusesRipper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java index 3c0f1d90..7b201b24 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java @@ -40,7 +40,7 @@ public class EightmusesRipper extends AbstractHTMLRipper { @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^https?://(www\\.)?8muses\\.com/index/category/([a-zA-Z0-9\\-_]+).*$"); + Pattern p = Pattern.compile("^https?://(www\\.)?8muses\\.com/comix/album/([a-zA-Z0-9\\-_]+).*$"); Matcher m = p.matcher(url.toExternalForm()); if (!m.matches()) { throw new MalformedURLException("Expected URL format: http://www.8muses.com/index/category/albumname, got: " + url);