mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-01-17 04:38:18 +01:00
Imagefap: add retry logic for getFullSizedImage() (#181)
This commit is contained in:
parent
eb351d4b05
commit
ab2b27c6a6
@ -144,8 +144,17 @@ public class ImagefapRipper extends AbstractHTMLRipper {
|
||||
}
|
||||
String image = getFullSizedImage("https://www.imagefap.com" + thumb.parent().attr("href"));
|
||||
|
||||
if(image == null)
|
||||
throw new RuntimeException("Unable to extract image URL from single image page! Unable to continue");
|
||||
if (image == null) {
|
||||
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 + "'");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user