Webtoon ripper can now rip from all pages

This commit is contained in:
cyian-1756 2017-08-19 00:27:00 -04:00
parent 47c67b1733
commit e323495b65

View File

@ -88,4 +88,16 @@ public class WebtoonsRipper extends AbstractHTMLRipper {
cookies = resp.cookies();
return Http.url(url).get();
}
@Override
public Document getNextPage(Document doc) throws IOException {
// Find next page
String nextUrl = "";
Element elem = doc.select("a.pg_next").first();
nextUrl = elem.attr("href");
if (nextUrl == "") {
throw new IOException("No more pages");
}
return Http.url(nextUrl).get();
}
}