JagodibujaRipper now stops ripping when the ripper is stopped

This commit is contained in:
cyian-1756 2018-09-11 05:14:58 -04:00
parent 85316c7646
commit e30caaecda

View File

@ -50,6 +50,12 @@ public class JagodibujaRipper extends AbstractHTMLRipper {
public List<String> getURLsFromPage(Document doc) {
List<String> result = new ArrayList<>();
for (Element comicPageUrl : doc.select("div.gallery-icon > a")) {
// Check if the ripper has been stopped
try {
stopCheck();
} catch (IOException e) {
return result;
}
try {
sleep(500);
Document comicPage = Http.url(comicPageUrl.attr("href")).get();