String url = MessageFormat.format(SEARCH_URL, URLEncoder.encode(query, "UTF-8"), start);
parser.setURL(url);
NodeFilter discFilter = new AndFilter(
new NodeClassFilter(TableRow.class),
new HasChildFilter(new HasChildFilter(new CssClassFilter("searchDisplay")))
);
NodeCollector searchCollector = new NodeCollector(new NodeFilter[] {
new CssClassFilter("activeTab"),
discFilter,
});
NodeCollector infoCollector = new NodeCollector(new NodeFilter[] {
new AndFilter(new NodeClassFilter(LinkTag.class),
new HasParentFilter(new CssClassFilter("searchDisplay"))),
new AndFilter(new NodeClassFilter(Span.class),
new HasParentFilter(new CssClassFilter("searchDisplay"))),
new AndFilter(new NodeClassFilter(ImageTag.class),
new CssClassFilter("star"))
});
parser.extractAllNodesThatMatch(searchCollector);
Node activeTab = searchCollector.getNode(0);