Web Scrapers Generator BrowserExt


Gets the link on the xpath given. Acceptable only inside the loadpage.

var = getlink(xpath[, options = dict()]);


xpath Xpath expression string definig the node address.
options Parameters dictionary. May contain the following elements:
next If this parameter is set to 'true', getlink will return the link element, which is next to the node requested. See Example 1.
html By means of this parameter html code can be passed, then the function will look for elements by the xpath in this html code but not in the loaded page.

Returning value: links array.

If you want to save the file by the link, use the function storefile

Example 1. Lets do a search at ebay.com by java keyword in the Books category. At the bottom of the page there will be pages list. Lets point the xpath of the element by specifying options next, get the link, pointing at the next page. Then we can load this link and get the link at the next page again.