From cac3ca161525a28fb12a08a645f399eda500bff5 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 25 Feb 2018 20:22:07 -0500 Subject: [PATCH 1/3] Fixed 8muses --- .../com/rarchives/ripme/ripper/rippers/EightmusesRipper.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 b7b5658f..621a4786 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java @@ -93,7 +93,7 @@ public class EightmusesRipper extends AbstractHTMLRipper { Elements pageImages = page.getElementsByClass("c-tile"); for (Element thumb : pageImages) { // If true this link is a sub album - if (thumb.attr("href").contains("/comix/album/")) { + if (thumb.attr("href").contains("/comics/album/")) { String subUrl = "https://www.8muses.com" + thumb.attr("href"); try { logger.info("Retrieving " + subUrl); @@ -106,7 +106,8 @@ public class EightmusesRipper extends AbstractHTMLRipper { logger.warn("Error while loading subalbum " + subUrl, e); } - } else if (thumb.attr("href").contains("/comix/picture/")) { + } else if (thumb.attr("href").contains("/comics/picture/")) { + logger.info("This page is a album"); logger.info("Ripping image"); if (super.isStopped()) break; // Find thumbnail image source From c965de94929799f3326d5779774613de51fde409 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 25 Feb 2018 20:26:06 -0500 Subject: [PATCH 2/3] Updated regex --- .../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 621a4786..43873cf9 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java @@ -51,7 +51,7 @@ public class EightmusesRipper extends AbstractHTMLRipper { @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^https?://(www\\.)?8muses\\.com/comix/album/([a-zA-Z0-9\\-_]+).*$"); + Pattern p = Pattern.compile("^https?://(www\\.)?8muses\\.com/(comix|comics)/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); From a5f08ff7c1b728af54e9d619cc48f3e66a35d65f Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sun, 25 Feb 2018 20:37:36 -0500 Subject: [PATCH 3/3] Added unit test for new url format --- .../ripme/tst/ripper/rippers/EightmusesRipperTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/EightmusesRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/EightmusesRipperTest.java index 469c330a..4a6c3539 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/EightmusesRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/EightmusesRipperTest.java @@ -10,6 +10,9 @@ public class EightmusesRipperTest extends RippersTest { // A simple image album EightmusesRipper ripper = new EightmusesRipper(new URL("https://www.8muses.com/comix/album/Affect3D-Comics/TheDude3DX/Lust-Unleashed-The-Urge-To-Explore")); testRipper(ripper); + // Test the new url format + ripper = new EightmusesRipper(new URL("https://www.8muses.com/comics/album/Affect3D-Comics/TheDude3DX/Lust-Unleashed-The-Urge-To-Explore")); + testRipper(ripper); // Test pages with subalbums ripper = new EightmusesRipper(new URL("https://www.8muses.com/comix/album/Blacknwhitecomics_com-Comix/BlacknWhiteComics/The-Mayor")); testRipper(ripper);