| 程序包 | 说明 |
|---|---|
| us.codecraft.webmagic |
Main class "Spider" and models.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Spider |
Spider.addPipeline(Pipeline pipeline)
add a pipeline for Spider
|
Spider |
Spider.addRequest(Request... requests)
Add urls with information to crawl.
|
Spider |
Spider.addUrl(String... urls)
Add urls to crawl.
|
Spider |
Spider.clearPipeline()
clear the pipelines set
|
static Spider |
Spider.create(PageProcessor pageProcessor)
create a spider with pageProcessor.
|
Spider |
Spider.downloader(Downloader downloader)
已过时。
|
Spider |
Spider.pipeline(Pipeline pipeline)
已过时。
|
Spider |
Spider.scheduler(Scheduler scheduler)
set scheduler for Spider
|
Spider |
Spider.setDownloader(Downloader downloader)
set the downloader of spider
|
Spider |
Spider.setExecutorService(ExecutorService executorService) |
Spider |
Spider.setExitWhenComplete(boolean exitWhenComplete)
Exit when complete.
|
Spider |
Spider.setPipelines(List<Pipeline> pipelines)
set pipelines for Spider
|
Spider |
Spider.setScheduler(Scheduler scheduler)
set scheduler for Spider
|
Spider |
Spider.setSpawnUrl(boolean spawnUrl)
Whether add urls extracted to download.
|
Spider |
Spider.setSpiderListeners(List<SpiderListener> spiderListeners) |
Spider |
Spider.setUUID(String uuid)
Set an uuid for spider.
|
Spider |
Spider.startRequest(List<Request> startRequests)
Set startUrls of Spider.
|
Spider |
Spider.startUrls(List<String> startUrls)
Set startUrls of Spider.
|
Spider |
Spider.thread(ExecutorService executorService,
int threadNum)
start with more than one threads
|
Spider |
Spider.thread(int threadNum)
start with more than one threads
|
Copyright © 2016. All rights reserved.