Merge pull request #594 from cyian-1756/hentai2readFixes

hentai2read can now get the album thumbnail links again
This commit is contained in:
cyian-1756 2018-05-16 12:01:48 -04:00 committed by GitHub
commit 6a065034d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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("a[data-original-title=Thumbnails").attr("href");
thumbnailLink = tempDoc.select("div.col-xs-12 > div.reader-controls > div.controls-block > button > a").attr("href");
if (!thumbnailLink.equals("")) {
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");
}