diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java index 7c4d15c1..2dc95fa4 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/EightmusesRipper.java @@ -115,27 +115,23 @@ public class EightmusesRipper extends AbstractHTMLRipper { String image = null; if (thumb.hasAttr("data-cfsrc")) { image = thumb.attr("data-cfsrc"); - } - else { + } else { // Deobfustace the json data String rawJson = deobfuscateJSON(page.select("script#ractive-public").html() .replaceAll(">", ">").replaceAll("<", "<").replace("&", "&")); + LOGGER.info(rawJson); JSONObject json = new JSONObject(rawJson); try { for (int i = 0; i != json.getJSONArray("pictures").length(); i++) { image = "https://www.8muses.com/image/fl/" + json.getJSONArray("pictures").getJSONObject(i).getString("publicUri"); URL imageUrl = new URL(image); - if (Utils.getConfigBoolean("8muses.use_short_names", false)) { - addURLToDownload(imageUrl, getPrefixShort(x), getSubdir(page.select("title").text()), this.url.toExternalForm(), cookies, "", null, true); - } else { - addURLToDownload(imageUrl, getPrefixLong(x), getSubdir(page.select("title").text()), this.url.toExternalForm(), cookies, "", null, true); - } + addURLToDownload(imageUrl, getPrefixShort(x), getSubdir(page.select("title").text()), this.url.toExternalForm(), cookies, "", null, true); // X is our page index x++; } - - } catch (IOException e) { - continue; + return imageURLs; + } catch (MalformedURLException e) { + LOGGER.error("\"" + image + "\" is malformed"); } } if (!image.contains("8muses.com")) {