Scrape Attribute
From UBot Studio
(Difference between revisions)
(Created page with "$Scrape Attribute is a Browser Function. The function returns the value of a specified element on a selected element. As with all other scraping, you wi...") |
(→Example) |
||
Line 9: | Line 9: | ||
<pre> | <pre> | ||
set(#my item, $scrape attribute(<href="/files/ScriptReferences//TheSelectors.pdf">, "name"), "Global") | set(#my item, $scrape attribute(<href="/files/ScriptReferences//TheSelectors.pdf">, "name"), "Global") | ||
− | <pre> | + | </pre> |
Running the script sets a variable named "my item". The scrape attribute scrapes the selected element by the innertext. If the innertext of the item is available on the page, the innertext is scraped to the variable, as seen in the debugger. | Running the script sets a variable named "my item". The scrape attribute scrapes the selected element by the innertext. If the innertext of the item is available on the page, the innertext is scraped to the variable, as seen in the debugger. | ||
[[File:scrapeattribute.png]] | [[File:scrapeattribute.png]] |
Revision as of 17:55, 28 November 2012
$Scrape Attribute is a Browser Function.
The function returns the value of a specified element on a selected element. As with all other scraping, you will be scraping the data to a list or variable. The element selector is used to select an item for the scrape attribute.
Example
set(#my item, $scrape attribute(<href="/files/ScriptReferences//TheSelectors.pdf">, "name"), "Global")
Running the script sets a variable named "my item". The scrape attribute scrapes the selected element by the innertext. If the innertext of the item is available on the page, the innertext is scraped to the variable, as seen in the debugger.