Commit eeb607fd authored by yihua.huang's avatar yihua.huang

将Spider.processRequest()抛出异常改回原来的逻辑

parent 97592d67
...@@ -403,7 +403,9 @@ public class Spider implements Runnable, Task { ...@@ -403,7 +403,9 @@ public class Spider implements Runnable, Task {
protected void processRequest(Request request) { protected void processRequest(Request request) {
Page page = downloader.download(request, this); Page page = downloader.download(request, this);
if (page == null) { if (page == null) {
throw new RuntimeException("unaccpetable response status"); sleep(site.getSleepTime());
onError(request);
return;
} }
// for cycle retry // for cycle retry
if (page.isNeedCycleRetry()) { if (page.isNeedCycleRetry()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment