Web Scrapers Generator BrowserExt

gethtml

Returns the html code for the specified xpath. Valid only inside loadpage and submitform.

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

Parameters:

xpath The string with the xpath expression, defining the node's address.
options Dictionary of parameters. May contain the following elements:
content If this option is set to 'true', then gethtml returns html node content, specified by xpath expression, otherwise returns and the node tag itself.
html With this option, you can pass html code, and the function will search elements by xpath in this html code and not in the loaded page.

Returned value: an array of strings.

To remove some of the tags with the entire content of the html code, such as all the script tags and iframe you need to use the function removetags.

Example 1. Gets the html code of each item in the list of divs.