-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
Milestone
Description
受到Spring 5的启发,决定把之前比较纠结的ExtractBy API拆成4个注解:
@ExtractByJson("$.xxx")
@ExtractByXpath("$.xxx")
@ExtractByRegex(value="$.xxx",group=1)
@ExtractByCss(value="$.xxx",field="text")这样可以单独设置不同的属性。
另外,之前有一种情况,之前处理的不好,就是一个页面要抽取多个Model的情况,类似于https://api.github.com/users/code4craft/repos。增加一个@ExtractAsList。
@TargetUrl("https://api.github.com/users/[\\w\\-]+/repos")
@ExtractAsList
public class Repo {
}Reactions are currently unavailable