MCPcopy Index your code
hub / github.com/code4craft/webmagic / xpath

Function xpath

webmagic-scripts/src/main/resources/js/defines.js:4–6  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

2 return page.getHtml().$(str).toString();
3}
4function xpath(str){
5 return page.getHtml().xpath(str).toString();
6}
7function urls(str){
8 links = page.getHtml().links().regex(str).all();
9 page.addTargetRequests(links);

Callers 1

github.jsFile · 0.70

Calls 3

getHtmlMethod · 0.80
toStringMethod · 0.65
xpathMethod · 0.65

Tested by

no test coverage detected