1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-04-21 12:12:38 +02:00

mulemax renamed to fooktube

This commit is contained in:
soloturn 2020-07-29 08:18:02 +02:00
parent b9ef190c3d
commit e2e6aca965
3 changed files with 22 additions and 22 deletions

View File

@ -16,11 +16,11 @@ import org.jsoup.select.Elements;
import com.rarchives.ripme.ripper.VideoRipper;
import com.rarchives.ripme.utils.Http;
public class MulemaxRipper extends AbstractSingleFileRipper {
public class FooktubeRipper extends AbstractSingleFileRipper {
private static final String HOST = "mulemax";
public MulemaxRipper(URL url) throws IOException {
public FooktubeRipper(URL url) throws IOException {
super(url);
}
@ -41,7 +41,7 @@ public class MulemaxRipper extends AbstractSingleFileRipper {
@Override
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());
return m.matches();
}
@ -53,15 +53,15 @@ public class MulemaxRipper extends AbstractSingleFileRipper {
@Override
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());
if (m.matches()) {
return m.group(2);
}
throw new MalformedURLException(
"Expected mulemax format:"
+ "mulemax.com/video/####"
"Expected fooktube format:"
+ "fooktube.com/video/####"
+ " Got: " + url);
}

View File

@ -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);
}
}

View File

@ -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);
}
}