Fixed xhamster getNextPage
This commit is contained in:
parent
cbfd363842
commit
0c4ec95ca4
@ -69,12 +69,14 @@ public class XhamsterRipper extends AbstractHTMLRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Document getNextPage(Document doc) throws IOException {
|
public Document getNextPage(Document doc) throws IOException {
|
||||||
if (!doc.select("a.next").first().attr("href").equals("")) {
|
if (doc.select("a.next").first() != null) {
|
||||||
|
if (doc.select("a.next").first().attr("href").startsWith("http")) {
|
||||||
return Http.url(doc.select("a.next").first().attr("href")).get();
|
return Http.url(doc.select("a.next").first().attr("href")).get();
|
||||||
} else {
|
|
||||||
throw new IOException("No more pages");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
throw new IOException("No more pages");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user