update some code for annotation
parent
122cebfa5f
commit
e7657cca30
|
@ -355,6 +355,10 @@ webmagic-extension包括注解模块。为什么会有注解方式?
|
|||
@ExtractBy(value = "//div[@class='BlogTags']/a/text()", multi = true)
|
||||
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) {
|
||||
OOSpider.create(
|
||||
Site.me().addStartUrl("http://my.oschina.net/flashsword/blog"),
|
||||
|
|
Loading…
Reference in New Issue