https://github.com/movsb/relwarc
Relwarc isn't a crawler.
https://github.com/movsb/relwarc
Last synced: 7 months ago
JSON representation
Relwarc isn't a crawler.
- Host: GitHub
- URL: https://github.com/movsb/relwarc
- Owner: movsb
- Created: 2020-01-02T11:32:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-11T14:33:40.000Z (almost 6 years ago)
- Last Synced: 2025-02-08T03:44:19.183Z (8 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# relwarc
Relwarc is an intuitive, objective wrapper for [`chromedp`](https://github.com/chromedp/chromedp)。
## example usage
```go
package mainimport (
"fmt"
"io/ioutil""github.com/chromedp/cdproto/page"
)func main() {
relwarc := NewRelwarc()
defer relwarc.Close()browser1, tab1 := relwarc.NewBrowserAndTab()
_ = browser1
tab1.Navigate(&page.NavigateParams{
URL: "https://www.example.com",
})png, err := tab1.CaptureScreenshot(nil)
if err != nil {
panic(err)
}if err := ioutil.WriteFile("screenshot.png", png, 0666); err != nil {
panic(err)
}location, err := tab1.Location()
if err != nil {
panic(err)
}
fmt.Println(location)title, err := tab1.Title()
if err != nil {
panic(title)
}
fmt.Println(title)
}
```