Now rips full albums

This commit is contained in:
cyian-1756 2017-03-06 23:43:44 -05:00
parent 5595894992
commit 2c99c6140c

View File

@ -65,6 +65,27 @@ public class CheveretoRipper extends AbstractHTMLRipper {
return Http.url(url).get();
}
@Override
public Document getNextPage(Document doc) throws IOException {
// Find next page
String nextUrl = "";
// We use comic-nav-next to the find the next page
Element elem = doc.select("li.pagination-next > a").first();
if (elem == null) {
throw new IOException("No more pages");
}
String nextPage = elem.attr("href");
// Some times this returns a empty string
// This for stops that
if (nextPage == "") {
logger.info("Got empty string for nextpage")
return null;
}
else {
return Http.url(nextPage).get();
}
}
@Override
public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<String>();