Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

emgfc/surf

 
 

Repository files navigation

Surf

Build Status Documentation MIT License

Surf is a Go (golang) library that implements a virtual web browser that you control pragmatically. Surf isn't just another Go solution for downloading content from the web. Surf is designed to behave like web browser, and includes: cookie management, history, bookmarking, user agent spoofing (with a nifty user agent builder), submitting forms, DOM selection and traversal via jQuery style CSS selectors, scraping assets like images, stylesheets, and other features.

Installation

Download the library using go.
go get github.com/headzoo/surf

Import the library into your project.
import "github.com/headzoo/surf"

Quick Start

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())
}

Documentation

Complete documentation is available on Read the Docs.

Credits

Surf 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.

Twitter

Surf uses the awesome goquery by Martin Angers, and was written using Intellij and the golang plugin.

Contributions have been made to Surf by the following awesome developers:

Contributing

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.

License

Surf is released open source software released under The MIT License (MIT). See LICENSE.md for more information.

About

Stateful programmatic web browsing in Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%