Fixed 8muses ripper

This commit is contained in:
cyian-1756 2017-11-07 21:04:38 -05:00
parent e857ad93bd
commit 3ad8454a0c

View File

@ -178,10 +178,8 @@ public class EightmusesRipper extends AbstractHTMLRipper {
sendUpdate(STATUS.LOADING_RESOURCE, imageUrl); sendUpdate(STATUS.LOADING_RESOURCE, imageUrl);
logger.info("Getting full sized image from " + imageUrl); logger.info("Getting full sized image from " + imageUrl);
Document doc = new Http(imageUrl).get(); // Retrieve the webpage of the image URL Document doc = new Http(imageUrl).get(); // Retrieve the webpage of the image URL
Element fullSizeImage = doc.select(".photo").first(); // Select the "photo" element from the page (there should only be 1) String imageName = doc.select("input[id=imageName]").attr("value"); // Select the "input" element from the page
// subdir is the sub dir the cdn has the image stored in return "https://www.8muses.com/image/fm/" + imageName;
String subdir = doc.select("input#imageDir").first().attr("value");
return "https://cdn.ampproject.org/i/s/www.8muses.com/" + subdir + "small/" + fullSizeImage.children().select("#imageName").attr("value");
} }
@Override @Override