Remove ButttoucherRipper (butttoucher.com is permanently down)
This commit is contained in:
parent
30319d1fd2
commit
7ee18bea79
@ -1,70 +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 org.jsoup.nodes.Document;
|
|
||||||
import org.jsoup.nodes.Element;
|
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
|
||||||
import com.rarchives.ripme.utils.Http;
|
|
||||||
|
|
||||||
public class ButttoucherRipper extends AbstractHTMLRipper {
|
|
||||||
|
|
||||||
public ButttoucherRipper(URL url) throws IOException {
|
|
||||||
super(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getHost() {
|
|
||||||
return "butttoucher";
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public String getDomain() {
|
|
||||||
return "butttoucher.com";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getGID(URL url) throws MalformedURLException {
|
|
||||||
Pattern p; Matcher m;
|
|
||||||
|
|
||||||
p = Pattern.compile("^.*butttoucher.com/users/([a-zA-Z0-9_\\-]+).*$");
|
|
||||||
m = p.matcher(url.toExternalForm());
|
|
||||||
if (m.matches()) {
|
|
||||||
return m.group(1);
|
|
||||||
}
|
|
||||||
throw new MalformedURLException(
|
|
||||||
"Expected butttoucher.com gallery format: "
|
|
||||||
+ "butttoucher.com/users/<username>"
|
|
||||||
+ " Got: " + url);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Document getFirstPage() throws IOException {
|
|
||||||
return Http.url(this.url).get();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<String> getURLsFromPage(Document page) {
|
|
||||||
List<String> thumbs = new ArrayList<>();
|
|
||||||
for (Element thumb : page.select(".thumb img")) {
|
|
||||||
if (!thumb.hasAttr("src")) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String smallImage = thumb.attr("src");
|
|
||||||
thumbs.add(smallImage.replace("m.", "."));
|
|
||||||
}
|
|
||||||
return thumbs;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void downloadURL(URL url, int index) {
|
|
||||||
addURLToDownload(url, getPrefix(index));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -155,7 +155,6 @@ public class RipUtils {
|
|||||||
if (url == null) url = urlFromDeviantartDirectoryName(dir);
|
if (url == null) url = urlFromDeviantartDirectoryName(dir);
|
||||||
if (url == null) url = urlFromRedditDirectoryName(dir);
|
if (url == null) url = urlFromRedditDirectoryName(dir);
|
||||||
if (url == null) url = urlFromSiteDirectoryName(dir, "bfcakes", "http://www.bcfakes.com/celebritylist/", "");
|
if (url == null) url = urlFromSiteDirectoryName(dir, "bfcakes", "http://www.bcfakes.com/celebritylist/", "");
|
||||||
if (url == null) url = urlFromSiteDirectoryName(dir, "butttoucher", "http://butttoucher.com/users/", "");
|
|
||||||
if (url == null) url = urlFromSiteDirectoryName(dir, "cheeby", "http://cheeby.com/u/", "");
|
if (url == null) url = urlFromSiteDirectoryName(dir, "cheeby", "http://cheeby.com/u/", "");
|
||||||
if (url == null) url = urlFromSiteDirectoryName(dir, "datwin", "http://datw.in/", "");
|
if (url == null) url = urlFromSiteDirectoryName(dir, "datwin", "http://datw.in/", "");
|
||||||
if (url == null) url = urlFromSiteDirectoryName(dir, "drawcrowd", "http://drawcrowd.com/", "");
|
if (url == null) url = urlFromSiteDirectoryName(dir, "drawcrowd", "http://drawcrowd.com/", "");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user