From afdff0ebc48b5b794316141bf8cf26f1cf844a82 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Wed, 16 May 2018 11:38:49 -0400 Subject: [PATCH] hentai2read can now get the album thumbnail link again --- .../ripme/ripper/rippers/Hentai2readRipper.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 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 d994c11b..7441d8d6 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/Hentai2readRipper.java @@ -44,12 +44,17 @@ public class Hentai2readRipper extends AbstractHTMLRipper { @Override public Document getFirstPage() throws IOException { + String thumbnailLink; try { Document tempDoc; tempDoc = Http.url(url).get(); // Get the thumbnail page so we can rip all images without loading every page in the comic - String thumbnailLink = tempDoc.select("div.col-xs-12 > div.reader-controls > div.controls-block > button > a").attr("href"); - return Http.url(thumbnailLink).get(); + thumbnailLink = tempDoc.select("div.col-xs-12 > div.reader-controls > div.controls-block > button > a").attr("href"); + if (thumbnailLink != null) { + return Http.url(thumbnailLink).get(); + } else { + return Http.url(tempDoc.select("a[data-original-title=Thumbnails").attr("href")).get(); + } } catch (IOException e) { throw new IOException("Unable to get first page"); }