diff --git a/README.md b/README.md index db6e012..98fea5a 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ Thanks these people for commiting source code, reporting bugs or suggesting for * [seveniu](https://github.com/seveniu) * [sebastian1118](https://github.com/sebastian1118) * [codev777](https://github.com/codev777) +* [fengwuze](https://github.com/fengwuze) ### Thanks: diff --git a/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java b/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java index 4ec692d..807043e 100644 --- a/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java +++ b/webmagic-core/src/test/java/us/codecraft/webmagic/selector/SelectorTest.java @@ -27,7 +27,11 @@ public class SelectorTest { @Test public void testNodes() throws Exception { Html selectable = new Html(html); - List links = selectable.xpath("//a").nodes(); +List divs = html.xpath("//div").nodes(); +for (Selectable div : divs) { + System.out.println(div.xpath("//h2").get()); +} + assertThat(links.get(0).links().get()).isEqualTo("http://whatever.com/aaa"); } }