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

Added quick Queue support

This commit is contained in:
cyian-1756
2018-10-24 01:38:45 -04:00
parent 1bc6eb87d9
commit d2aeb4e218

View File

@@ -20,6 +20,27 @@ public class DuckmoviesRipper extends AbstractSingleFileRipper {
super(url);
}
@Override
public boolean hasQueueSupport() {
return true;
}
@Override
public boolean pageContainsAlbums(URL url) {
Pattern pa = Pattern.compile("https?://[a-zA-Z0-9]+.[a-zA-Z]+/models/([a-zA-Z0-9_-])+/?");
Matcher ma = pa.matcher(url.toExternalForm());
return ma.matches();
}
@Override
public List<String> getAlbumsToQueue(Document doc) {
List<String> urlsToAddToQueue = new ArrayList<>();
for (Element elem : doc.select(".post > li > div > div > a")) {
urlsToAddToQueue.add(elem.attr("href"));
}
return urlsToAddToQueue;
}
private static List<String> explicit_domains = Arrays.asList(
"vidporntube.fun",
@@ -82,6 +103,11 @@ public class DuckmoviesRipper extends AbstractSingleFileRipper {
if (m.matches()) {
return m.group(1);
}
p = Pattern.compile("https?://[a-zA-Z0-9]+.[a-zA-Z]+/models/([a-zA-Z0-9_-])+/?");
m = p.matcher(url.toExternalForm());
if (m.matches()) {
return m.group(1);
}
throw new MalformedURLException(
"Expected duckmovies format:"