Give it a URL and an XPath expression and it will fetch the URL, parse it, and return a JSON structure of the results of the XPath selection.
- url: the URL to fetch
- xpath: the xpath expression
curl 'http://localhost:8080/?url=http://example.com/&xpath=//img/@src'
A successful request will return something like:
{"results" : {"text": "foo.jpg"}}
A bad xpath expression will return:
{"error" : "bad xpath"}
And HTTP errors will get passed along as well.
- CSS Selectors
- multiple xpath expressions
- multiple URLs
- async callbacks