public interface SeimiCrawler
| 限定符和类型 | 方法和说明 |
|---|---|
String[] |
allowRules()
用于设置允许的请求URL匹配规则
|
String[] |
denyRules()
用于设置要放弃访问的请求URL匹配规则
|
org.apache.http.client.CookieStore |
getCookieStore()
如果开启cookies通过此方法获取cookiesStore
|
String |
getUserAgent() |
void |
handleErrorRequest(Request request)
当一个请求处理异常次数超过开发者所设置或是默认设置的最大重新处理次数时会调用该方法记录异常请求
|
String |
proxy()
可以自定义返回随机的代理
|
String |
seimiAgentHost()
设置SeimiAgent的主机地址,如 seimi.wanghaomiao.cn or 10.10.15.211
|
int |
seimiAgentPort()
seimiAgent监听端口
|
void |
start(Response response)
针对startUrl生成首批的response回调这个初始接口
|
String[] |
startUrls()
设置起始url
|
String getUserAgent()
String proxy()
org.apache.http.client.CookieStore getCookieStore()
String[] startUrls()
String[] allowRules()
String[] denyRules()
void start(Response response)
response - void handleErrorRequest(Request request)
request - String seimiAgentHost()
int seimiAgentPort()
Copyright © 2016. All Rights Reserved.