go-zenrows
is a Go client for the ZenRows API, allowing users to easily scrape web content.
- Scrape Web Content: Easily scrape content from any website using the ZenRows API.
- Flexible Configuration: Comes with a default configuration but allows for customization.
- Various Scrape Options: Customize your scraping with options like JS rendering, custom headers, session ID, and more.
- Examples Included: A basic example is provided to help you get started quickly.
go get github.com/renatoaraujo/go-zenrows
Here's a basic example to get you started:
hc := &http.Client{
Timeout: time.Duration(60) * time.Second,
}
client := zenrows.NewClient(hc).WithApiKey("YOUR_API_KEY")
result, err := client.Scrape(context.TODO(), "https://httpbin.org", zenrows.WithJSRender())
if err != nil {
log.Fatalf("Failed to scrape the target: %v", err)
}
fmt.Println("Scraped Content:", result)
For a detailed list of all available functions and scrape options, refer to the official documentation:
The MIT License (MIT) - see LICENSE
for more details