Commit ef673b98 authored by yihua.huang's avatar yihua.huang

add a method for httpclientdownloader

parent 067f3ea0
......@@ -34,6 +34,17 @@ public class HttpClientDownloader implements Downloader {
private int poolSize = 1;
/**
* 直接下载页面的简便方法
*
* @param url
* @return
*/
public Html download(String url) {
Page page = download(new Request(url), null);
return (Html)page.getHtml();
}
@Override
public Page download(Request request, Task task) {
Site site = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment