fix duplicate call of onSuccess and onError #605

pull/592/merge
yihua.huang 8 years ago
parent 3a589d4ca6
commit 6bd1eed25e

@ -410,7 +410,6 @@ public class Spider implements Runnable, Task {
}
private void onDownloadSuccess(Request request, Page page) {
onSuccess(request);
if (site.getAcceptStatCode().contains(page.getStatusCode())){
pageProcessor.process(page);
extractAndAddRequests(page, spawnUrl);
@ -431,7 +430,6 @@ public class Spider implements Runnable, Task {
// for cycle retry
doCycleRetry(request);
}
onError(request);
}
private void doCycleRetry(Request request) {

Loading…
Cancel
Save