1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 07:14:38 +02:00

fix xhamster testGetNextPage

This commit is contained in:
soloturn
2020-11-26 17:42:00 +01:00
parent e0d40df5ad
commit e967394eb7

View File

@@ -139,8 +139,8 @@ public class XhamsterRipper extends AbstractHTMLRipper {
@Override
public Document getNextPage(Document doc) throws IOException {
if (doc.select("a[data-page=next]").first() != null) {
String nextPageUrl = doc.select("a[data-page=next]").first().attr("href");
if (doc.select("a[rel=next]").first() != null) {
String nextPageUrl = doc.select("a[rel=next]").first().attr("href");
if (nextPageUrl.startsWith("http")) {
nextPageUrl = nextPageUrl.replaceAll("https?://\\w?\\w?\\.?xhamster\\.", "https://m.xhamster.");
nextPageUrl = nextPageUrl.replaceAll("https?://xhamster2\\.", "https://m.xhamster2.");