1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-29 16:50:10 +02:00

Added support for hqporner videos hosted on flyflv

This commit is contained in:
cyian-1756
2018-11-16 05:47:46 -05:00
parent 4acfb57b9c
commit 99d6fb0d06

View File

@@ -39,6 +39,26 @@ public class HqpornerRipper extends AbstractSingleFileRipper {
return null;
}
private String getVideoFromFlyFlv(String url) {
try {
logger.info("Downloading " + url);
Document page = Http.url(url).referrer(url).get();
String[] videoSizes = { "1080p","720p","360p"};
for (String videoSize : videoSizes) {
String urlToReturn = page.select("video > source[label=" + videoSize).attr("src");
if (urlToReturn != null && !urlToReturn.equals("")) {
return urlToReturn;
}
}
} catch (IOException e) {
logger.error("Unable to get page with video");
}
return null;
}
private String getVideoName() {
try {
String filename = getGID(url);
@@ -77,8 +97,19 @@ public class HqpornerRipper extends AbstractSingleFileRipper {
@Override
public List<String> getURLsFromPage(Document doc) {
String videoUrl = null;
List<String> result = new ArrayList<>();
result.add("https:" + getVideoFromMyDaddycc("https:" + doc.select("div.videoWrapper > iframe").attr("src")));
String videoPageUrl = "https:" + doc.select("div.videoWrapper > iframe").attr("src");
if (videoPageUrl.contains("mydaddy")) {
videoUrl = getVideoFromMyDaddycc(videoPageUrl);
} else if (videoPageUrl.contains("flyflv")) {
videoUrl = getVideoFromFlyFlv(videoPageUrl);
}
if (videoUrl != null) {
result.add("https:" + videoUrl);
}
return result;
}