mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-01 19:40:18 +02:00
Imagefap: add retry logic for getFullSizedImage() (#181)
This commit is contained in:
@@ -144,8 +144,17 @@ public class ImagefapRipper extends AbstractHTMLRipper {
|
|||||||
}
|
}
|
||||||
String image = getFullSizedImage("https://www.imagefap.com" + thumb.parent().attr("href"));
|
String image = getFullSizedImage("https://www.imagefap.com" + thumb.parent().attr("href"));
|
||||||
|
|
||||||
if(image == null)
|
if (image == null) {
|
||||||
throw new RuntimeException("Unable to extract image URL from single image page! Unable to continue");
|
for (int i = 0; i < HTTP_RETRY_LIMIT; i++) {
|
||||||
|
image = getFullSizedImage("https://www.imagefap.com" + thumb.parent().attr("href"));
|
||||||
|
if (image != null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
sleep(PAGE_SLEEP_TIME);
|
||||||
|
}
|
||||||
|
if (image == null)
|
||||||
|
throw new RuntimeException("Unable to extract image URL from single image page! Unable to continue");
|
||||||
|
}
|
||||||
|
|
||||||
LOGGER.debug("Adding imageURL: '" + image + "'");
|
LOGGER.debug("Adding imageURL: '" + image + "'");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user