From f8ae2212c0af05470c05d95cb35378efee4a18df Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Tue, 17 Apr 2018 04:11:13 -0400 Subject: [PATCH] Fixed Hentai2Read folder naming --- .../rarchives/ripme/ripper/rippers/Hentai2readRipper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java index 6e76bbc6..db4cbd97 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java @@ -33,7 +33,7 @@ public class Hentai2readRipper extends AbstractHTMLRipper { @Override public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("https://hentai2read\\.com/([a-zA-Z0-9_-]*)/?"); + Pattern p = Pattern.compile("https?://hentai2read\\.com/([a-zA-Z0-9_-]*)/\\d/?"); Matcher m = p.matcher(url.toExternalForm()); if (m.matches()) { return m.group(1); @@ -63,9 +63,7 @@ public class Hentai2readRipper extends AbstractHTMLRipper { @Override public String getAlbumTitle(URL url) throws MalformedURLException { try { - Document doc = getFirstPage(); - String title = doc.select("span[itemprop=title]").text(); - return getHost() + "_" + title; + return getHost() + "_" + getGID(url); } catch (Exception e) { // Fall back to default album naming convention logger.warn("Failed to get album title from " + url, e);