Now rips full albums
This commit is contained in:
parent
5595894992
commit
2c99c6140c
@ -65,6 +65,27 @@ public class CheveretoRipper extends AbstractHTMLRipper {
|
|||||||
return Http.url(url).get();
|
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
|
@Override
|
||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
List<String> result = new ArrayList<String>();
|
List<String> result = new ArrayList<String>();
|
||||||
|
Loading…
Reference in New Issue
Block a user