Scrape Action API Reference ๐
Introduction ๐
The Scrape
action is used to extract data from a web element. This is part of the core
package in Go-Ski.
Syntax ๐
Here's how you define a Scrape
action:
Action{
Type: core.Scrape,
XPath: "/html/body/h1",
}
Parameters ๐ ๏ธ
Type
: Should be set tocore.Scrape
.XPath
: The XPath of the element you want to scrape data from.
Example ๐
Here's a simple example that scrapes data from an element:
Action{
Type: core.Scrape,
XPath: "/html/body/h1",
}
Conclusion ๐
The Scrape
action is essential for extracting data from web pages. It allows you to collect the information you need for further processing or analysis.
For the complete example, you can check out the Go-Ski GitHub Repository (opens in a new tab).