Fixed ImagearnRipper (#45)
This commit is contained in:
parent
1214d19187
commit
3180372a9f
@ -78,10 +78,15 @@ public class ImagearnRipper extends AbstractHTMLRipper {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
List<String> imageURLs = new ArrayList<String>();
|
List<String> imageURLs = new ArrayList<String>();
|
||||||
for (Element thumb : doc.select("img.border")) {
|
for (Element thumb : doc.select("div#gallery > div > a")) {
|
||||||
String image = thumb.attr("src");
|
String imageURL = thumb.attr("href");
|
||||||
image = image.replaceAll("thumbs[0-9]*\\.imagearn\\.com/", "img.imagearn.com/imags/");
|
try {
|
||||||
imageURLs.add(image);
|
Document imagedoc = new Http("http://imagearn.com/" + imageURL).get();
|
||||||
|
String image = imagedoc.select("a.thickbox").first().attr("href");
|
||||||
|
imageURLs.add(image);
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.warn("Was unable to download page: " + imageURL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return imageURLs;
|
return imageURLs;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user