commit
671aae2875
@ -68,11 +68,11 @@ public class PornhubRipper extends VideoRipper {
|
|||||||
title = title.replaceAll("\\+", " ");
|
title = title.replaceAll("\\+", " ");
|
||||||
|
|
||||||
vidUrl = null;
|
vidUrl = null;
|
||||||
for (String quality : new String[] {"quality_1080p", "quality_720p", "quality_480p", "quality_240p"}) {
|
for (String quality : new String[] {"1080", "720", "480", "240"}) {
|
||||||
Pattern pv = Pattern.compile("^.*var player_" + quality + " = '([^']*)'.*$", Pattern.DOTALL);
|
Pattern pv = Pattern.compile("\"quality\":\"" + quality + "\",\"videoUrl\":\"(.*?)\"");
|
||||||
Matcher mv = pv.matcher(html);
|
Matcher mv = pv.matcher(html);
|
||||||
if (mv.matches()) {
|
if (mv.find()) {
|
||||||
vidUrl = mv.group(1);
|
vidUrl = mv.group(1).replace("\\/", "/");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,8 +56,6 @@ public class VideoRippersTest extends RippersTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/RipMeApp/ripme/issues/187
|
|
||||||
/*
|
|
||||||
public void testPornhubRipper() throws IOException {
|
public void testPornhubRipper() throws IOException {
|
||||||
List<URL> contentURLs = new ArrayList<>();
|
List<URL> contentURLs = new ArrayList<>();
|
||||||
contentURLs.add(new URL("http://www.pornhub.com/view_video.php?viewkey=993166542"));
|
contentURLs.add(new URL("http://www.pornhub.com/view_video.php?viewkey=993166542"));
|
||||||
@ -66,7 +64,6 @@ public class VideoRippersTest extends RippersTest {
|
|||||||
videoTestHelper(ripper);
|
videoTestHelper(ripper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// https://github.com/RipMeApp/ripme/issues/186
|
// https://github.com/RipMeApp/ripme/issues/186
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user