Merge pull request #944 from cyian-1756/xhamsterPageFix
Fixed xhamster getnextpage
This commit is contained in:
commit
192abc08d1
@ -113,9 +113,9 @@ public class XhamsterRipper extends AbstractHTMLRipper {
|
||||
|
||||
@Override
|
||||
public Document getNextPage(Document doc) throws IOException {
|
||||
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();
|
||||
if (doc.select("a[data-page=next]").first() != null) {
|
||||
if (doc.select("a[data-page=next]").first().attr("href").startsWith("http")) {
|
||||
return Http.url(doc.select("a[data-page=next]").first().attr("href")).get();
|
||||
}
|
||||
}
|
||||
throw new IOException("No more pages");
|
||||
|
Loading…
Reference in New Issue
Block a user