Closed
Description
Add jsonpath to annotation mode for json extrat:
public class AppStore {
@ExtractBy(type = ExtractBy.Type.JsonPath, value = "$..trackName")
private String trackName;
@ExtractBy(type = ExtractBy.Type.JsonPath, value = "$..description")
private String description;
public static void main(String[] args) {
AppStore appStore = OOSpider.create(Site.me(), AppStore.class).<AppStore>get("http://itunes.apple.com/lookup?id=653350791&country=cn&entity=software");
System.out.println(appStore.trackName);
System.out.println(appStore.description);
}
}