sleep time

master
yihua.huang 2013-07-26 16:34:09 +08:00
parent 42508af041
commit cc18d863f3
1 changed files with 2 additions and 2 deletions

View File

@ -30,13 +30,13 @@ public class HuabanProcessor implements PageProcessor {
@Override
public Site getSite() {
if (site == null) {
site = Site.me().setDomain("huaban.com").addStartUrl("http://huaban.com/");
site = Site.me().setDomain("huaban.com").addStartUrl("http://huaban.com/").setSleepTime(1000);
}
return site;
}
public static void main(String[] args) {
Spider.create(new HuabanProcessor())
Spider.create(new HuabanProcessor()).thread(5)
.scheduler(new RedisScheduler("localhost"))
.pipeline(new FilePipeline("/data/webmagic/test/"))
.downloader(new SeleniumDownloader("/Users/yihua/Downloads/chromedriver"))