Fixed deviantArt "no next page found" error
The pagination buttons are gone. The "coffset" buttons for comment pages, not gallery pages. I patched this by using a link found in the HTML itself that I think is used by JavaScript to generate the pagination buttons.
This commit is contained in:
parent
f2afb840dd
commit
4cf9f09293
@ -201,14 +201,15 @@ public class DeviantartRipper extends AbstractHTMLRipper {
|
||||
if (isThisATest()) {
|
||||
return null;
|
||||
}
|
||||
Elements nextButtons = page.select("li.next > a");
|
||||
Elements nextButtons = page.select("link[rel=\"next\"]");
|
||||
if (nextButtons.size() == 0) {
|
||||
if (page.select("link[rel=\"prev\"]").size() == 0) {
|
||||
throw new IOException("No next page found");
|
||||
}
|
||||
Element a = nextButtons.first();
|
||||
if (a.hasClass("disabled")) {
|
||||
} else {
|
||||
throw new IOException("Hit end of pages");
|
||||
}
|
||||
}
|
||||
Element a = nextButtons.first();
|
||||
String nextPage = a.attr("href");
|
||||
if (nextPage.startsWith("/")) {
|
||||
nextPage = "http://" + this.url.getHost() + nextPage;
|
||||
|
Loading…
Reference in New Issue
Block a user