hentai2read can now get the album thumbnail link again
This commit is contained in:
parent
694dc3fe5b
commit
afdff0ebc4
@ -44,12 +44,17 @@ public class Hentai2readRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Document getFirstPage() throws IOException {
|
public Document getFirstPage() throws IOException {
|
||||||
|
String thumbnailLink;
|
||||||
try {
|
try {
|
||||||
Document tempDoc;
|
Document tempDoc;
|
||||||
tempDoc = Http.url(url).get();
|
tempDoc = Http.url(url).get();
|
||||||
// Get the thumbnail page so we can rip all images without loading every page in the comic
|
// 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");
|
thumbnailLink = tempDoc.select("div.col-xs-12 > div.reader-controls > div.controls-block > button > a").attr("href");
|
||||||
return Http.url(thumbnailLink).get();
|
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) {
|
} catch (IOException e) {
|
||||||
throw new IOException("Unable to get first page");
|
throw new IOException("Unable to get first page");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user