update some code for annotation

master
yihua.huang 2013-09-28 08:00:00 +08:00
parent 122cebfa5f
commit e7657cca30
1 changed files with 4 additions and 0 deletions

View File

@ -354,6 +354,10 @@ webmagic-extension包括注解模块。为什么会有注解方式
@ExtractBy(value = "//div[@class='BlogTags']/a/text()", multi = true) @ExtractBy(value = "//div[@class='BlogTags']/a/text()", multi = true)
private List<String> tags; private List<String> tags;
@Formatter("yyyy-MM-dd HH:mm")
@ExtractBy("//div[@class='BlogStat']/regex('\\d+-\\d+-\\d+\\s+\\d+:\\d+')")
private Date date;
public static void main(String[] args) { public static void main(String[] args) {
OOSpider.create( OOSpider.create(