mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-08 23:06:54 +02:00
mulemax renamed to fooktube
This commit is contained in:
@@ -16,11 +16,11 @@ import org.jsoup.select.Elements;
|
|||||||
import com.rarchives.ripme.ripper.VideoRipper;
|
import com.rarchives.ripme.ripper.VideoRipper;
|
||||||
import com.rarchives.ripme.utils.Http;
|
import com.rarchives.ripme.utils.Http;
|
||||||
|
|
||||||
public class MulemaxRipper extends AbstractSingleFileRipper {
|
public class FooktubeRipper extends AbstractSingleFileRipper {
|
||||||
|
|
||||||
private static final String HOST = "mulemax";
|
private static final String HOST = "mulemax";
|
||||||
|
|
||||||
public MulemaxRipper(URL url) throws IOException {
|
public FooktubeRipper(URL url) throws IOException {
|
||||||
super(url);
|
super(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ public class MulemaxRipper extends AbstractSingleFileRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRip(URL url) {
|
public boolean canRip(URL url) {
|
||||||
Pattern p = Pattern.compile("^https?://.*mulemax\\.com/video/(.*)/.*$");
|
Pattern p = Pattern.compile("^https?://.*fooktube\\.com/video/(.*)/.*$");
|
||||||
Matcher m = p.matcher(url.toExternalForm());
|
Matcher m = p.matcher(url.toExternalForm());
|
||||||
return m.matches();
|
return m.matches();
|
||||||
}
|
}
|
||||||
@@ -53,15 +53,15 @@ public class MulemaxRipper extends AbstractSingleFileRipper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGID(URL url) throws MalformedURLException {
|
public String getGID(URL url) throws MalformedURLException {
|
||||||
Pattern p = Pattern.compile("^https?://.*mulemax\\.com/video/(.*)/(.*)$");
|
Pattern p = Pattern.compile("^https?://.*fooktube\\.com/video/(.*)/(.*)$");
|
||||||
Matcher m = p.matcher(url.toExternalForm());
|
Matcher m = p.matcher(url.toExternalForm());
|
||||||
if (m.matches()) {
|
if (m.matches()) {
|
||||||
return m.group(2);
|
return m.group(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new MalformedURLException(
|
throw new MalformedURLException(
|
||||||
"Expected mulemax format:"
|
"Expected fooktube format:"
|
||||||
+ "mulemax.com/video/####"
|
+ "fooktube.com/video/####"
|
||||||
+ " Got: " + url);
|
+ " Got: " + url);
|
||||||
}
|
}
|
||||||
|
|
@@ -0,0 +1,16 @@
|
|||||||
|
package com.rarchives.ripme.tst.ripper.rippers;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
import com.rarchives.ripme.ripper.rippers.FooktubeRipper;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class FooktubeRipperTest extends RippersTest {
|
||||||
|
@Test
|
||||||
|
public void testFooktubeVideo() throws IOException {
|
||||||
|
FooktubeRipper ripper = new FooktubeRipper(new URL("https://fooktube.com/video/641/in-the-cinema")); //pick any video from the front page
|
||||||
|
testRipper(ripper);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1,16 +0,0 @@
|
|||||||
package com.rarchives.ripme.tst.ripper.rippers;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.rippers.MulemaxRipper;
|
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
public class MulemaxRipperTest extends RippersTest {
|
|
||||||
@Test
|
|
||||||
public void testMulemaxVideo() throws IOException {
|
|
||||||
MulemaxRipper ripper = new MulemaxRipper(new URL("https://mulemax.com/video/1720/emma-and-her-older-sissy-are-home-for-a-holiday-break")); //pick any video from the front page
|
|
||||||
testRipper(ripper);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Reference in New Issue
Block a user