1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-26 15:24:51 +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 @Override
public Document getNextPage(Document doc) throws IOException { public Document getNextPage(Document doc) throws IOException {
if (doc.select("a[data-page=next]").first() != null) { if (doc.select("a[rel=next]").first() != null) {
String nextPageUrl = doc.select("a[data-page=next]").first().attr("href"); String nextPageUrl = doc.select("a[rel=next]").first().attr("href");
if (nextPageUrl.startsWith("http")) { if (nextPageUrl.startsWith("http")) {
nextPageUrl = nextPageUrl.replaceAll("https?://\\w?\\w?\\.?xhamster\\.", "https://m.xhamster."); nextPageUrl = nextPageUrl.replaceAll("https?://\\w?\\w?\\.?xhamster\\.", "https://m.xhamster.");
nextPageUrl = nextPageUrl.replaceAll("https?://xhamster2\\.", "https://m.xhamster2."); nextPageUrl = nextPageUrl.replaceAll("https?://xhamster2\\.", "https://m.xhamster2.");