WordpressComicRipper: fix indentation

This commit is contained in:
MetaPrime 2017-05-09 15:53:13 -07:00
parent c75aad47d4
commit 92405fb9f8

View File

@ -11,19 +11,18 @@ import java.util.regex.Pattern;
import org.jsoup.nodes.Document; import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element; import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import com.rarchives.ripme.ripper.AbstractHTMLRipper; import com.rarchives.ripme.ripper.AbstractHTMLRipper;
import com.rarchives.ripme.utils.Http; import com.rarchives.ripme.utils.Http;
public class WordpressComicRipper extends AbstractHTMLRipper { public class WordpressComicRipper extends AbstractHTMLRipper {
public WordpressComicRipper(URL url) throws IOException { public WordpressComicRipper(URL url) throws IOException {
super(url); super(url);
} }
public static List<String> explicit_domains = Arrays.asList("www.totempole666.com", public static List<String> explicit_domains = Arrays.asList("www.totempole666.com",
"buttsmithy.com", "themonsterunderthebed.net", "prismblush.com"); "buttsmithy.com", "themonsterunderthebed.net", "prismblush.com");
@Override @Override
public String getHost() { public String getHost() {
String host = url.toExternalForm().split("/")[2]; String host = url.toExternalForm().split("/")[2];
@ -63,8 +62,8 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
if (prismblushMat.matches()) { if (prismblushMat.matches()) {
return true; return true;
} }
} }
return false; return false;
} }
@ -97,7 +96,6 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
return super.getAlbumTitle(url); return super.getAlbumTitle(url);
} }
@Override @Override
public String getGID(URL url) throws MalformedURLException { public String getGID(URL url) throws MalformedURLException {
String url_name = url.toExternalForm(); String url_name = url.toExternalForm();
@ -129,10 +127,10 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
} }
nextPage = elem.attr("href"); nextPage = elem.attr("href");
} }
if (nextPage == "") { if (nextPage == "") {
throw new IOException("No more pages"); throw new IOException("No more pages");
} } else {
else {
return Http.url(nextPage).get(); return Http.url(nextPage).get();
} }
} }
@ -160,6 +158,4 @@ public class WordpressComicRipper extends AbstractHTMLRipper {
public void downloadURL(URL url, int index) { public void downloadURL(URL url, int index) {
addURLToDownload(url, getPrefix(index)); addURLToDownload(url, getPrefix(index));
} }
}
}