Hentaifoundry ripper no long throws a null error when getting the next page; No longer makes unneeded requests
This commit is contained in:
parent
1dadd26e05
commit
7d3c7f2b20
@ -74,12 +74,16 @@ public class HentaifoundryRipper extends AbstractHTMLRipper {
|
|||||||
}
|
}
|
||||||
Elements els = doc.select("li.next > a");
|
Elements els = doc.select("li.next > a");
|
||||||
Element first = els.first();
|
Element first = els.first();
|
||||||
|
try {
|
||||||
String nextURL = first.attr("href");
|
String nextURL = first.attr("href");
|
||||||
nextURL = "http://www.hentai-foundry.com" + nextURL;
|
nextURL = "http://www.hentai-foundry.com" + nextURL;
|
||||||
return Http.url(nextURL)
|
return Http.url(nextURL)
|
||||||
.referrer(url)
|
.referrer(url)
|
||||||
.cookies(cookies)
|
.cookies(cookies)
|
||||||
.get();
|
.get();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
throw new IOException("No more pages");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user