https://github.com/renatoaraujo/go-zenrows
Go wrapper for ZenRows API
https://github.com/renatoaraujo/go-zenrows
go golang zenrows
Last synced: 5 months ago
JSON representation
Go wrapper for ZenRows API
- Host: GitHub
- URL: https://github.com/renatoaraujo/go-zenrows
- Owner: renatoaraujo
- License: mit
- Created: 2023-10-09T04:54:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T18:11:22.000Z (over 2 years ago)
- Last Synced: 2023-10-12T18:19:39.672Z (over 2 years ago)
- Topics: go, golang, zenrows
- Language: Go
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-zenrows
===
[](https://pkg.go.dev/github.com/renatoaraujo/go-zenrows)
[](https://goreportcard.com/report/github.com/renatoaraujo/go-zenrows)
[](https://codecov.io/gh/renatoaraujo/go-zenrows)
`go-zenrows` is a Go client for the ZenRows API, allowing users to easily scrape web content.
## Features
- **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.
## Installation
```shell
go get github.com/renatoaraujo/go-zenrows
```
## Usage
Here's a basic example to get you started:
```go
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)
```
[View the full example here](examples/example.go).
## Documentation
For a detailed list of all available functions and scrape options, refer to the official documentation:
- [ZenRows docs website](https://www.zenrows.com/docs)
- [Go docs website](https://pkg.go.dev/github.com/renatoaraujo/go-zenrows)
## Credits
* [Renato Araujo](https://www.linkedin.com/in/renatoraraujo/)
## License
The MIT License (MIT) - see [`LICENSE`](LICENSE) for more details