You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
webmagic/release-note.md

55 lines
2.1 KiB
Markdown

12 years ago
Release Notes
----
12 years ago
*2012-8-9* `version0.2.0`
此次更新的主题是"方便"(之前的主题是"灵活")。
增加了webmagic-extension模块。
12 years ago
增加了注解方式支持可以通过POJO+注解的方式编写一个爬虫更符合Java开发习惯。以下是抓取一个博客的完整代码
12 years ago
@TargetUrl("http://my.oschina.net/flashsword/blog/\\d+")
public class OschinaBlog {
@ExtractBy("//title")
private String title;
@ExtractBy(value = "div.BlogContent",type = ExtractBy.Type.Css)
private String content;
@ExtractBy(value = "//div[@class='BlogTags']/a/text()", multi = true)
private List<String> tags;
public static void main(String[] args) {
OOSpider.create(Site.me().addStartUrl("http://my.oschina.net/flashsword/blog"),
12 years ago
new ConsolePageModelPipeline(), OschinaBlog.class)
.scheduler(new RedisScheduler("127.0.0.1")).thread(5).run();
12 years ago
}
}
增加基于redis的分布式支持。
增加XPath2.0语法支持(webmagic-saxon模块)。
增加基于Selenium的浏览器渲染支持用于抓取动态加载内容(webmagic-selenium模块)。
12 years ago
修复一些已有bug。
12 years ago
12 years ago
补充了文档:[webmagic-0.2.0用户手册](http://code4craft.github.io/webmagic/)。
12 years ago
12 years ago
*2012-7-25* `version0.1.0`
12 years ago
第一个稳定版本。
修改了若干API使得可扩展性更强为每个任务分配一个ID可以通过ID区分不同任务。
12 years ago
重写了Pipeline接口将抽取结果集包装到ResultItems对象而不是通用一个Page对象便于逻辑分离。
12 years ago
增加下载的重试机制支持gzip支持自定义UA/cookie。
12 years ago
增加多线程抓取功能,只需在初始化的时候指定线程数即可。
12 years ago
12 years ago
增加jquery形式的CSS Selector API可以通过`page.getHtml().$("div.body")`形式抽取元素。
12 years ago
12 years ago
完善了文档,架构说明:[webmagic的设计机制及原理-如何开发一个Java爬虫](http://my.oschina.net/flashsword/blog/145796)Javadoc[http://code4craft.github.io/webmagic/docs](http://code4craft.github.io/webmagic/docs)。