1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-09-02 02:12:45 +02:00

xhamster next page link a.prev-next-list-link--next

multiple issues reported, like #20, #21, RipMeApp#1852.
This commit is contained in:
soloturn
2021-03-28 09:04:04 +02:00
parent 9a05be80a5
commit 4e7092f1a7

View File

@@ -142,7 +142,7 @@ 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.prev-next-list-link").first() != null) { if (doc.select("a.prev-next-list-link").first() != null) {
String nextPageUrl = doc.select("a.prev-next-list-link").first().attr("href"); String nextPageUrl = doc.select("a.prev-next-list-link--next").first().attr("href");
if (nextPageUrl.startsWith("http")) { if (nextPageUrl.startsWith("http")) {
nextPageUrl = nextPageUrl.replaceAll("https?://\\w?\\w?\\.?xhamster([^<]*)\\.", "https://m.xhamster$1."); nextPageUrl = nextPageUrl.replaceAll("https?://\\w?\\w?\\.?xhamster([^<]*)\\.", "https://m.xhamster$1.");
return Http.url(nextPageUrl).get(); return Http.url(nextPageUrl).get();