fix javadoc
parent
0cd2f6031a
commit
d38d51dfcb
|
@ -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 HeaderConst}
|
* @param key key of http header, there are some keys constant in {@link HttpConstant.Header}
|
||||||
* @param value value of header
|
* @param value value of header
|
||||||
* @return this
|
* @return this
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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 the download task
|
||||||
* @return
|
* @return proxy
|
||||||
*/
|
*/
|
||||||
Proxy getProxy(Task task);
|
Proxy getProxy(Task task);
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue