Uses of Class
us.codecraft.webmagic.Site
-
Packages that use Site Package Description us.codecraft.webmagic Main class "Spider" and models.us.codecraft.webmagic.configurable us.codecraft.webmagic.downloader Downloader is the part that downloads web pages and store in Page object.us.codecraft.webmagic.example us.codecraft.webmagic.handler us.codecraft.webmagic.model Page model and annotations used to customize a crawler.us.codecraft.webmagic.processor PageProcessor custom part of a crawler for specific site.us.codecraft.webmagic.processor.example us.codecraft.webmagic.samples us.codecraft.webmagic.samples.scheduler us.codecraft.webmagic.scripts -
-
Uses of Site in us.codecraft.webmagic
Fields in us.codecraft.webmagic declared as Site Modifier and Type Field Description protected Site
Spider. site
Methods in us.codecraft.webmagic that return Site Modifier and Type Method Description Site
Site. addCookie(java.lang.String name, java.lang.String value)
Add a cookie with domaingetDomain()
Site
Site. addCookie(java.lang.String domain, java.lang.String name, java.lang.String value)
Add a cookie with specific domain.Site
Site. addHeader(java.lang.String key, java.lang.String value)
Put an Http header for downloader.Site
Spider. getSite()
Site
Task. getSite()
site of a taskstatic Site
Site. me()
new a SiteSite
Site. setAcceptStatCode(java.util.Set<java.lang.Integer> acceptStatCode)
Set acceptStatCode.
When status code of http response is in acceptStatCodes, it will be processed.
{200} by default.
It is not necessarily to be set.Site
Site. setCharset(java.lang.String charset)
Set charset of page manually.
When charset is not set or set to null, it can be auto detected by Http header.Site
Site. setCycleRetryTimes(int cycleRetryTimes)
Set cycleRetryTimes times when download fail, 0 by default.Site
Site. setDefaultCharset(java.lang.String defaultCharset)
Set default charset of page.Site
Site. setDisableCookieManagement(boolean disableCookieManagement)
Downloader is supposed to store response cookie.Site
Site. setDomain(java.lang.String domain)
set the domain of site.Site
Site. setRetrySleepTime(int retrySleepTime)
Set retry sleep times when download fail, 1000 by default.Site
Site. setRetryTimes(int retryTimes)
Set retry times when download fail, 0 by default.Site
Site. setSleepTime(int sleepTime)
Set the interval between the processing of two pages.
Time unit is milliseconds.Site
Site. setTimeOut(int timeOut)
set timeout for downloader in msSite
Site. setUseGzip(boolean useGzip)
Whether use gzip.Site
Site. setUserAgent(java.lang.String userAgent)
set user agentConstructors in us.codecraft.webmagic with parameters of type Site Constructor Description SimpleHttpClient(Site site)
-
Uses of Site in us.codecraft.webmagic.configurable
Methods in us.codecraft.webmagic.configurable that return Site Modifier and Type Method Description Site
ConfigurablePageProcessor. getSite()
Constructors in us.codecraft.webmagic.configurable with parameters of type Site Constructor Description ConfigurablePageProcessor(Site site, java.util.List<ExtractRule> extractRules)
-
Uses of Site in us.codecraft.webmagic.downloader
Methods in us.codecraft.webmagic.downloader with parameters of type Site Modifier and Type Method Description HttpClientRequestContext
HttpUriRequestConverter. convert(Request request, Site site, Proxy proxy)
org.apache.http.impl.client.CloseableHttpClient
HttpClientGenerator. getClient(Site site)
-
Uses of Site in us.codecraft.webmagic.example
Methods in us.codecraft.webmagic.example that return Site Modifier and Type Method Description Site
GithubRepoPageMapper. getSite()
-
Uses of Site in us.codecraft.webmagic.handler
Methods in us.codecraft.webmagic.handler that return Site Modifier and Type Method Description Site
CompositePageProcessor. getSite()
Methods in us.codecraft.webmagic.handler with parameters of type Site Modifier and Type Method Description CompositePageProcessor
CompositePageProcessor. setSite(Site site)
Constructors in us.codecraft.webmagic.handler with parameters of type Site Constructor Description CompositePageProcessor(Site site)
-
Uses of Site in us.codecraft.webmagic.model
Methods in us.codecraft.webmagic.model with parameters of type Site Modifier and Type Method Description static OOSpider
OOSpider. create(Site site, java.lang.Class... pageModels)
static OOSpider
OOSpider. create(Site site, PageModelPipeline pageModelPipeline, java.lang.Class... pageModels)
Constructors in us.codecraft.webmagic.model with parameters of type Site Constructor Description OOSpider(Site site, PageModelPipeline pageModelPipeline, java.lang.Class... pageModels)
create a spider -
Uses of Site in us.codecraft.webmagic.processor
Methods in us.codecraft.webmagic.processor that return Site Modifier and Type Method Description default Site
PageProcessor. getSite()
Returns the site settings.Site
SimplePageProcessor. getSite()
-
Uses of Site in us.codecraft.webmagic.processor.example
Methods in us.codecraft.webmagic.processor.example that return Site Modifier and Type Method Description Site
BaiduBaikePageProcessor. getSite()
Site
GithubRepoPageProcessor. getSite()
Site
ZhihuPageProcessor. getSite()
-
Uses of Site in us.codecraft.webmagic.samples
Methods in us.codecraft.webmagic.samples that return Site Modifier and Type Method Description Site
AlexanderMcqueenGoodsProcessor. getSite()
Site
AmanzonPageProcessor. getSite()
Site
AngularJSProcessor. getSite()
Site
DiandianBlogProcessor. getSite()
Site
DiaoyuwengProcessor. getSite()
Site
F58PageProcesser. getSite()
Site
GithubRepoPageProcessor. getSite()
Site
HuxiuProcessor. getSite()
Site
InfoQMiniBookProcessor. getSite()
Site
IteyeBlogProcessor. getSite()
Site
KaichibaProcessor. getSite()
Site
MamacnPageProcessor. getSite()
Site
MeicanProcessor. getSite()
Site
NjuBBSProcessor. getSite()
Site
PhantomJSPageProcessor. getSite()
Site
QzoneBlogProcessor. getSite()
Site
SinaBlogProcessor. getSite()
Site
TianyaPageProcesser. getSite()
Site
ZhihuPageProcessor. getSite()
-
Uses of Site in us.codecraft.webmagic.samples.scheduler
Methods in us.codecraft.webmagic.samples.scheduler that return Site Modifier and Type Method Description Site
ZipCodePageProcessor. getSite()
-
Uses of Site in us.codecraft.webmagic.scripts
Methods in us.codecraft.webmagic.scripts that return Site Modifier and Type Method Description Site
ScriptProcessor. getSite()
-