mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-04-21 12:12:38 +02:00
Remove FooktubeRipper - the site has changed ownership and is now a nearly-empty blog
This commit is contained in:
parent
4f6e16959b
commit
4ac7b1a5e5
@ -1,68 +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;
|
||||
|
||||
public class FooktubeRipper extends AbstractSingleFileRipper {
|
||||
|
||||
public FooktubeRipper(URL url) throws IOException {
|
||||
super(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
return "mulemax";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomain() {
|
||||
return "mulemax.com";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canRip(URL url) {
|
||||
Pattern p = Pattern.compile("^https?://.*fooktube\\.com/video/(.*)/.*$");
|
||||
Matcher m = p.matcher(url.toExternalForm());
|
||||
return m.matches();
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL sanitizeURL(URL url) throws MalformedURLException {
|
||||
return url;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGID(URL url) throws MalformedURLException {
|
||||
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 fooktube format:"
|
||||
+ "fooktube.com/video/####"
|
||||
+ " Got: " + url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getURLsFromPage(Document doc) {
|
||||
List<String> result = new ArrayList<>();
|
||||
result.add(doc.select(".video-js > source").attr("src"));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void downloadURL(URL url, int index) {
|
||||
addURLToDownload(url, getPrefix(index), "", "mulemax.com", null);
|
||||
}
|
||||
}
|
@ -1,19 +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.FooktubeRipper;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class FooktubeRipperTest extends RippersTest {
|
||||
@Test
|
||||
@Disabled("test or ripper broken")
|
||||
public void testFooktubeVideo() throws IOException, URISyntaxException {
|
||||
FooktubeRipper ripper = new FooktubeRipper(new URI("https://fooktube.com/video/641/in-the-cinema").toURL()); //pick any video from the front page
|
||||
testRipper(ripper);
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user