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