JagodibujaRipper now stops ripping when the ripper is stopped
This commit is contained in:
parent
85316c7646
commit
e30caaecda
@ -50,6 +50,12 @@ public class JagodibujaRipper extends AbstractHTMLRipper {
|
|||||||
public List<String> getURLsFromPage(Document doc) {
|
public List<String> getURLsFromPage(Document doc) {
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
for (Element comicPageUrl : doc.select("div.gallery-icon > a")) {
|
for (Element comicPageUrl : doc.select("div.gallery-icon > a")) {
|
||||||
|
// Check if the ripper has been stopped
|
||||||
|
try {
|
||||||
|
stopCheck();
|
||||||
|
} catch (IOException e) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
sleep(500);
|
sleep(500);
|
||||||
Document comicPage = Http.url(comicPageUrl.attr("href")).get();
|
Document comicPage = Http.url(comicPageUrl.attr("href")).get();
|
||||||
|
Loading…
Reference in New Issue
Block a user