WordpressComicRipper: fix formatting
This commit is contained in:
parent
90a8ab6f81
commit
b8294b8152
@ -16,7 +16,7 @@ import com.rarchives.ripme.ripper.AbstractHTMLRipper;
|
||||
import com.rarchives.ripme.utils.Http;
|
||||
|
||||
public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
String pageTitle ="";
|
||||
String pageTitle = "";
|
||||
|
||||
public WordpressComicRipper(URL url) throws IOException {
|
||||
super(url);
|
||||
@ -35,6 +35,7 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
public static List<String> explicit_domains = Arrays.asList("www.totempole666.com",
|
||||
"buttsmithy.com", "themonsterunderthebed.net", "prismblush.com", "www.konradokonski.com", "freeadultcomix.com",
|
||||
"thisis.delvecomic.com", "comics-xxx.com");
|
||||
|
||||
@Override
|
||||
public String getHost() {
|
||||
String host = url.toExternalForm().split("/")[2];
|
||||
@ -51,7 +52,6 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
public boolean canRip(URL url) {
|
||||
String url_name = url.toExternalForm();
|
||||
if (explicit_domains.contains(url_name.split("/")[2])) {
|
||||
|
||||
Pattern totempole666Pat = Pattern.compile("https?://www\\.totempole666.com/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher totempole666Mat = totempole666Pat.matcher(url.toExternalForm());
|
||||
if (totempole666Mat.matches()) {
|
||||
@ -99,8 +99,8 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
if (comicsxxxMat.matches()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -117,6 +117,7 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
if (buttsmithyMat.matches()) {
|
||||
return "buttsmithy.com" + "_" + "Alfie";
|
||||
}
|
||||
|
||||
Pattern konradokonskiSawdustPat = Pattern.compile("http://www.konradokonski.com/sawdust/comic/([a-zA-Z0-9_-]*)/?$");
|
||||
Matcher konradokonskiSawdustMat = konradokonskiSawdustPat.matcher(url.toExternalForm());
|
||||
if (konradokonskiSawdustMat.matches()) {
|
||||
@ -154,10 +155,10 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
|
||||
}
|
||||
|
||||
return super.getAlbumTitle(url);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGID(URL url) throws MalformedURLException {
|
||||
@Override
|
||||
public String getGID(URL url) throws MalformedURLException {
|
||||
String url_name = url.toExternalForm();
|
||||
// We shouldn't need to return any GID
|
||||
if (explicit_domains.contains(url_name.split("/")[2])) {
|
||||
@ -185,8 +186,7 @@ public String getGID(URL url) throws MalformedURLException {
|
||||
}
|
||||
if (nextPage == "") {
|
||||
throw new IOException("No more pages");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return Http.url(nextPage).get();
|
||||
}
|
||||
}
|
||||
@ -226,12 +226,10 @@ public String getGID(URL url) throws MalformedURLException {
|
||||
pageTitle = pageTitle.replace("–", "");
|
||||
pageTitle = pageTitle.replace(",", "");
|
||||
pageTitle = pageTitle.replace(" ", "");
|
||||
|
||||
}
|
||||
result.add(elem.attr("src"));
|
||||
}
|
||||
|
||||
|
||||
// freeadultcomix gets it own if because it needs to add http://freeadultcomix.com to the start of each link
|
||||
if (url.toExternalForm().contains("freeadultcomix.com")) {
|
||||
for (Element elem : doc.select("div.single-post > p > img.aligncenter")) {
|
||||
|
Loading…
Reference in New Issue
Block a user