Merge pull request #944 from cyian-1756/xhamsterPageFix

Fixed xhamster getnextpage
This commit is contained in:
cyian-1756 2018-09-15 14:53:37 -04:00 committed by GitHub
commit 192abc08d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,9 +113,9 @@ 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() != null) { if (doc.select("a[data-page=next]").first() != null) {
if (doc.select("a.next").first().attr("href").startsWith("http")) { if (doc.select("a[data-page=next]").first().attr("href").startsWith("http")) {
return Http.url(doc.select("a.next").first().attr("href")).get(); return Http.url(doc.select("a[data-page=next]").first().attr("href")).get();
} }
} }
throw new IOException("No more pages"); throw new IOException("No more pages");