Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
webmagic
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
webmagic
Commits
d38d51df
Commit
d38d51df
authored
Apr 15, 2017
by
yihua.huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix javadoc
parent
0cd2f603
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
Site.java
webmagic-core/src/main/java/us/codecraft/webmagic/Site.java
+1
-1
Spider.java
...agic-core/src/main/java/us/codecraft/webmagic/Spider.java
+1
-0
ProxyProvider.java
.../main/java/us/codecraft/webmagic/proxy/ProxyProvider.java
+6
-5
PhantomJSDownloader.java
...us/codecraft/webmagic/downloader/PhantomJSDownloader.java
+1
-1
No files found.
webmagic-core/src/main/java/us/codecraft/webmagic/Site.java
View file @
d38d51df
...
@@ -238,7 +238,7 @@ public class Site {
...
@@ -238,7 +238,7 @@ public class Site {
* Put an Http header for downloader. <br>
* Put an Http header for downloader. <br>
* Use {@link #addCookie(String, String)} for cookie and {@link #setUserAgent(String)} for user-agent. <br>
* Use {@link #addCookie(String, String)} for cookie and {@link #setUserAgent(String)} for user-agent. <br>
*
*
* @param key key of http header, there are some keys constant in {@link H
eaderConst
}
* @param key key of http header, there are some keys constant in {@link H
ttpConstant.Header
}
* @param value value of header
* @param value value of header
* @return this
* @return this
*/
*/
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/Spider.java
View file @
d38d51df
...
@@ -500,6 +500,7 @@ public class Spider implements Runnable, Task {
...
@@ -500,6 +500,7 @@ public class Spider implements Runnable, Task {
* Download urls synchronizing.
* Download urls synchronizing.
*
*
* @param urls urls
* @param urls urls
* @param <T> type of process result
* @return list downloaded
* @return list downloaded
*/
*/
public
<
T
>
List
<
T
>
getAll
(
Collection
<
String
>
urls
)
{
public
<
T
>
List
<
T
>
getAll
(
Collection
<
String
>
urls
)
{
...
...
webmagic-core/src/main/java/us/codecraft/webmagic/proxy/ProxyProvider.java
View file @
d38d51df
...
@@ -12,16 +12,17 @@ public interface ProxyProvider {
...
@@ -12,16 +12,17 @@ public interface ProxyProvider {
/**
/**
*
*
* @param proxy
* Return proxy to Provider when complete a download.
* @param page
* @param proxy the proxy config contains host,port and identify info
* @param task
* @param page the download result
* @param task the download task
*/
*/
void
returnProxy
(
Proxy
proxy
,
Page
page
,
Task
task
);
void
returnProxy
(
Proxy
proxy
,
Page
page
,
Task
task
);
/**
/**
* Get a proxy for task by some strategy.
* Get a proxy for task by some strategy.
* @param task task
* @param task t
he download t
ask
* @return
* @return
proxy
*/
*/
Proxy
getProxy
(
Task
task
);
Proxy
getProxy
(
Task
task
);
...
...
webmagic-extension/src/main/java/us/codecraft/webmagic/downloader/PhantomJSDownloader.java
View file @
d38d51df
...
@@ -38,7 +38,7 @@ public class PhantomJSDownloader extends AbstractDownloader {
...
@@ -38,7 +38,7 @@ public class PhantomJSDownloader extends AbstractDownloader {
* phantomjs --ignore-ssl-errors=yes 忽略抓取地址是https时的一些错误
* phantomjs --ignore-ssl-errors=yes 忽略抓取地址是https时的一些错误
* /usr/local/bin/phantomjs 命令的绝对路径,避免因系统环境变量引起的IOException
* /usr/local/bin/phantomjs 命令的绝对路径,避免因系统环境变量引起的IOException
*
*
* @param phantomJsCommand
* @param phantomJsCommand
phantomJsCommand
*/
*/
public
PhantomJSDownloader
(
String
phantomJsCommand
)
{
public
PhantomJSDownloader
(
String
phantomJsCommand
)
{
this
.
initPhantomjsCrawlPath
();
this
.
initPhantomjsCrawlPath
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment