Minor style changes of DeviantartRipper

This commit is contained in:
cyian-1756 2018-05-09 10:34:39 -04:00
parent c4eb31f1e9
commit b760ed35c9

View File

@ -43,14 +43,17 @@ public class DeviantartRipper extends AbstractHTMLRipper {
public String getHost() { public String getHost() {
return "deviantart"; return "deviantart";
} }
@Override @Override
public String getDomain() { public String getDomain() {
return "deviantart.com"; return "deviantart.com";
} }
@Override @Override
public boolean hasDescriptionSupport() { public boolean hasDescriptionSupport() {
return true; return true;
} }
@Override @Override
public URL sanitizeURL(URL url) throws MalformedURLException { public URL sanitizeURL(URL url) throws MalformedURLException {
String u = url.toExternalForm(); String u = url.toExternalForm();
@ -121,6 +124,7 @@ public class DeviantartRipper extends AbstractHTMLRipper {
.cookies(cookies) .cookies(cookies)
.get(); .get();
} }
private String jsonToImage(Document page, String id) { private String jsonToImage(Document page, String id) {
Elements js = page.select("script[type=\"text/javascript\"]"); Elements js = page.select("script[type=\"text/javascript\"]");
for (Element tag : js) { for (Element tag : js) {
@ -142,6 +146,7 @@ public class DeviantartRipper extends AbstractHTMLRipper {
} }
return null; return null;
} }
@Override @Override
public List<String> getURLsFromPage(Document page) { public List<String> getURLsFromPage(Document page) {
List<String> imageURLs = new ArrayList<>(); List<String> imageURLs = new ArrayList<>();
@ -192,6 +197,7 @@ public class DeviantartRipper extends AbstractHTMLRipper {
} }
return imageURLs; return imageURLs;
} }
@Override @Override
public List<String> getDescriptionsFromPage(Document page) { public List<String> getDescriptionsFromPage(Document page) {
List<String> textURLs = new ArrayList<>(); List<String> textURLs = new ArrayList<>();
@ -210,6 +216,7 @@ public class DeviantartRipper extends AbstractHTMLRipper {
} }
return textURLs; return textURLs;
} }
@Override @Override
public Document getNextPage(Document page) throws IOException { public Document getNextPage(Document page) throws IOException {
if (isThisATest()) { if (isThisATest()) {