fix huaban demo #475
parent
895fca9fd7
commit
11904a4d41
|
@ -22,7 +22,7 @@ public class HuabanProcessor implements PageProcessor {
|
||||||
public void process(Page page) {
|
public void process(Page page) {
|
||||||
page.addTargetRequests(page.getHtml().links().regex("http://huaban\\.com/.*").all());
|
page.addTargetRequests(page.getHtml().links().regex("http://huaban\\.com/.*").all());
|
||||||
if (page.getUrl().toString().contains("pins")) {
|
if (page.getUrl().toString().contains("pins")) {
|
||||||
page.putField("img", page.getHtml().xpath("//div[@id='pin_img']/a/img/@src").toString());
|
page.putField("img", page.getHtml().xpath("//div[@class='image-holder']/a/img/@src").toString());
|
||||||
} else {
|
} else {
|
||||||
page.getResultItems().setSkip(true);
|
page.getResultItems().setSkip(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#driver=phantomjs
|
#driver=phantomjs
|
||||||
driver=firefox
|
#driver=firefox
|
||||||
driver=chrome
|
driver=chrome
|
||||||
#driver=http://localhost:8910
|
#driver=http://localhost:8910
|
||||||
driver=http://localhost:4444/wd/hub
|
driver=http://localhost:4444/wd/hub
|
||||||
|
|
Loading…
Reference in New Issue