No Description

Pat Lathem 8233b86cef More debug output 11 months ago
agent 040ce4fba8 Merge remote-tracking branch 'origin/dev' 1 year ago
browser 8233b86cef More debug output 11 months ago
docs 7f616b45f4 Update doc 1 year ago
errors 4e3741cadc Created DownloadAsync methods 4 years ago
jar ab11baf317 Add ability to cleanup held resources by calling ClearHistory() on the HistoryJar when it is no longer needed. Implemented ability to set a maximum history length that will be enforced as the history grows. Expose the various jar containers directly instead of having methods on Browser to manipulate them. 1 year ago
util 4e3741cadc Created DownloadAsync methods 4 years ago
.gitignore a183c4e0d4 Updated .gitignore 3 years ago
.travis.yml 3ab5b77981 Changes docs to show importing gopkg.in/headzoo/surf.v1 1 year ago
CHANGELOG.md 3ab5b77981 Changes docs to show importing gopkg.in/headzoo/surf.v1 1 year ago
CONTRIBUTING.md 05a9e4629f Removes reference to 'dev' branch in CONTRIBUTING.md 1 year ago
LICENSE.md 4044dc7700 Renamed LICENSE to LICENSE.md 3 years ago
README.md db9a594a13 Merge pull request #70 from headzoo/use-master-for-development 1 year ago
mkdocs.yml 3ab5b77981 Changes docs to show importing gopkg.in/headzoo/surf.v1 1 year ago
surf.go ab11baf317 Add ability to cleanup held resources by calling ClearHistory() on the HistoryJar when it is no longer needed. Implemented ability to set a maximum history length that will be enforced as the history grows. Expose the various jar containers directly instead of having methods on Browser to manipulate them. 1 year ago
surf_test.go 8c9f4df515 Implement http.Client reuse so we are not creating a new client for every request. 1 year ago

README.md

Surf

Build Status GoDoc Documentation MIT License

Surf is a Go (golang) library that implements a virtual web browser that you control programmatically. 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 gopkg.in/headzoo/surf.v1

Import the library into your project. import "gopkg.in/headzoo/surf.v1"

Quick Start

package main

import (
	"gopkg.in/headzoo/surf.v1"
	"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 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:

The idea to create Surf was born in this Reddit thread.

Contributing

Issues and pull requests are always welcome.

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.