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:
@@ -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.");
|
||||||
|
Reference in New Issue
Block a user