mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-18 11:41:21 +02:00
Removed StickyXXXRipper - stickyxxx.com is permanently offline
This commit is contained in:
@@ -1,63 +0,0 @@
|
|||||||
package com.rarchives.ripme.ripper.rippers.video;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.util.regex.Matcher;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import org.jsoup.nodes.Document;
|
|
||||||
import org.jsoup.select.Elements;
|
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.VideoRipper;
|
|
||||||
import com.rarchives.ripme.utils.Http;
|
|
||||||
|
|
||||||
public class StickyXXXRipper extends VideoRipper {
|
|
||||||
|
|
||||||
private static final String HOST = "stickyxxx";
|
|
||||||
|
|
||||||
public StickyXXXRipper(URL url) throws IOException {
|
|
||||||
super(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHost() {
|
|
||||||
return HOST;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canRip(URL url) {
|
|
||||||
Pattern p = Pattern.compile("^https?://.*stickyxxx\\.com(/)(.*)/$");
|
|
||||||
Matcher m = p.matcher(url.toExternalForm());
|
|
||||||
return m.matches();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGID(URL url) throws MalformedURLException {
|
|
||||||
Pattern p = Pattern.compile("^https?://.*stickyxxx\\.com(/)(.*)/$");
|
|
||||||
Matcher m = p.matcher(url.toExternalForm());
|
|
||||||
if (m.matches()) {
|
|
||||||
return m.group(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw new MalformedURLException(
|
|
||||||
"Expected stickyxxx format:"
|
|
||||||
+ "stickyxxx.com/####"
|
|
||||||
+ " Got: " + url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void rip() throws IOException, URISyntaxException {
|
|
||||||
LOGGER.info("Retrieving " + this.url);
|
|
||||||
Document doc = Http.url(url).get();
|
|
||||||
Elements videos = doc.select(".wp-video > video > source");
|
|
||||||
if (videos.isEmpty()) {
|
|
||||||
throw new IOException("Could not find Embed code at " + url);
|
|
||||||
}
|
|
||||||
String vidUrl = videos.attr("src");
|
|
||||||
addURLToDownload(new URI(vidUrl).toURL(), HOST + "_" + getGID(this.url));
|
|
||||||
waitForThreads();
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,23 +0,0 @@
|
|||||||
package com.rarchives.ripme.tst.ripper.rippers;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URI;
|
|
||||||
import java.net.URISyntaxException;
|
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.video.StickyXXXRipper;
|
|
||||||
// import com.rarchives.ripme.tst.ripper.rippers.RippersTest;
|
|
||||||
import com.rarchives.ripme.utils.Utils;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
public class StickyXXXRipperTest extends RippersTest {
|
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testStickyXXXVideo() throws IOException, URISyntaxException {
|
|
||||||
// This test fails on the CI - possibly due to checking for a file before it's written - so we're skipping it
|
|
||||||
if (Utils.getConfigBoolean("test.run_flaky_tests", false)) {
|
|
||||||
StickyXXXRipper ripper = new StickyXXXRipper(new URI("http://www.stickyxxx.com/a-very-intense-farewell/").toURL());
|
|
||||||
testRipper(ripper);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user