Surf is a Go (golang) library that implements a virtual browser that you can control pragmatically. Just like a real browser you can open pages, follow links, bookmark pages, submit forms, and many other things.
Download the library using go.
go get github.com/headzoo/surf
Import the library into your project.
import "github.com/headzoo/surf"
package main
import (
"github.com/headzoo/surf"
"fmt"
)
func main() {
bow := surf.NewBrowser()
err := bow.Open("http://golang.org")
if err != nil {
panic(err)
}
// Outputs: "The Go Programming Language"
fmt.Println(bow.Title())
}
Complete documentation is available on Read the Docs.
Go was started by Sean Hickey (headzoo) to learn more about the Go programming language. The idea to create Surf was born in this Reddit thread.
Surf uses the awesome goquery by Martin Angers, and was written using Intellij and the golang plugin.
Contributing authors:
Issues and pull requests are always welcome. Code changes are made to the
dev
branch. Once a milestone has been reached the branch will
be merged in with master
, and a new version tag created. Do not make your changes against the
master
branch, or they will may be ignored.
See CONTRIBUTING.md for more information.
Surf is released open source software released under The MIT License (MIT). See LICENSE.md for more information.