diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/Tubex6Ripper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/Tubex6Ripper.java deleted file mode 100644 index 35ca8281..00000000 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/Tubex6Ripper.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.rarchives.ripme.ripper.rippers; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import com.rarchives.ripme.ripper.AbstractSingleFileRipper; -import org.jsoup.nodes.Document; - -import com.rarchives.ripme.utils.Http; - -public class Tubex6Ripper extends AbstractSingleFileRipper { - - public Tubex6Ripper(URL url) throws IOException { - super(url); - } - - @Override - public String getHost() { - return "tubex6"; - } - - @Override - public String getDomain() { - return "tubex6.com"; - } - - @Override - public String getGID(URL url) throws MalformedURLException { - Pattern p = Pattern.compile("^http://.*tubex6\\.com/(.*)/$"); - Matcher m = p.matcher(url.toExternalForm()); - if (m.matches()) { - return m.group(1); - } - throw new MalformedURLException("Expected tubex6.com URL format: " + - "tubex6.com/NAME - got " + url + " instead"); - } - - @Override - public Document getFirstPage() throws IOException { - return Http.url(url).get(); - } - - @Override - public List getURLsFromPage(Document doc) { - List result = new ArrayList<>(); - result.add(doc.select("source[type=video/mp4]").attr("src")); - return result; - } - - @Override - public void downloadURL(URL url, int index) { - // We have to send a referrer or the site returns a 403 error - addURLToDownload(url, getPrefix(index), "", this.url.toExternalForm(), null); - } -} \ No newline at end of file diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/Tubex6RipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/Tubex6RipperTest.java deleted file mode 100644 index 83ff88a1..00000000 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/Tubex6RipperTest.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.rarchives.ripme.tst.ripper.rippers; - -import java.io.IOException; -import java.net.URL; - -import com.rarchives.ripme.ripper.rippers.Tubex6Ripper; - -public class Tubex6RipperTest extends RippersTest { - public void testRip() throws IOException { - Tubex6Ripper ripper = new Tubex6Ripper(new URL("http://www.tubex6.com/my-sister-sleeps-naked-1/")); - testRipper(ripper); - } - - public void testGetGID() throws IOException { - URL url = new URL("http://www.tubex6.com/my-sister-sleeps-naked-1/"); - Tubex6Ripper ripper = new Tubex6Ripper(url); - assertEquals("my-sister-sleeps-naked-1", ripper.getGID(url)); - } -} \ No newline at end of file