1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-01-16 20:28:15 +01:00

Remove ErotivRipper - it has been replaced with a spam site

This commit is contained in:
MetaPrime 2025-01-06 16:40:04 -08:00
parent 9e06597cae
commit 93e8701ee8
2 changed files with 0 additions and 125 deletions

View File

@ -1,92 +0,0 @@
package com.rarchives.ripme.ripper.rippers;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jsoup.Connection.Response;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
import com.rarchives.ripme.utils.Http;
/**
*
* @author randomcommitter
*/
public class ErotivRipper extends AbstractHTMLRipper {
boolean rippingProfile;
public ErotivRipper(URL url) throws IOException {
super(url);
}
@Override
public String getDomain() {
return "erotiv.io";
}
@Override
public String getHost() {
return "erotiv";
}
@Override
public String getGID(URL url) throws MalformedURLException {
Pattern p = Pattern.compile("^https?://(?:www.)?erotiv.io/e/([0-9]*)/?$");
Matcher m = p.matcher(url.toExternalForm());
if (m.matches()) {
return m.group(1);
}
throw new MalformedURLException("erotiv video not found in " + url + ", expected https://erotiv.io/e/id");
}
@Override
public Document getFirstPage() throws IOException {
Response resp = Http.url(this.url).ignoreContentType().response();
return resp.parse();
}
@Override
public URL sanitizeURL(URL url) throws MalformedURLException, URISyntaxException {
return new URI(url.toExternalForm().replaceAll("https?://www.erotiv.io", "https://erotiv.io")).toURL();
}
@Override
public List<String> getURLsFromPage(Document doc) {
List<String> results = new ArrayList<>();
for (Element el : doc.select("video[id=\"video-id\"] > source")) {
if (el.hasAttr("src")) {
Pattern p = Pattern.compile("/uploads/[0-9]*\\.mp4");
Matcher m = p.matcher(el.attr("src"));
if (m.matches()) {
results.add("https://erotiv.io" + el.attr("src"));
}
}
}
return results;
}
@Override
public void downloadURL(URL url, int index) {
addURLToDownload(url, getPrefix(index));
}
@Override
public boolean hasQueueSupport() {
return true;
}
}

View File

@ -1,33 +0,0 @@
package com.rarchives.ripme.tst.ripper.rippers;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import com.rarchives.ripme.ripper.rippers.ErotivRipper;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
public class ErotivRipperTest extends RippersTest {
@Test
public void testGetGID() throws IOException, URISyntaxException {
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
ErotivRipper ripper = new ErotivRipper(url);
assert("1568314255".equals(ripper.getGID(url)));
}
public void testRip() throws IOException, URISyntaxException {
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
ErotivRipper ripper = new ErotivRipper(url);
testRipper(ripper);
}
@Test
@Disabled("test or ripper broken")
public void testGetURLsFromPage() throws IOException, URISyntaxException {
URL url = new URI("https://erotiv.io/e/1568314255").toURL();
ErotivRipper ripper = new ErotivRipper(url);
assert(1 == ripper.getURLsFromPage(ripper.getFirstPage()).size());
}
}