Thanks to visit codestin.com
Credit goes to github.com

Skip to content

waveletlet/surf

 
 

Repository files navigation

Surf

This is a custom fork for testing experimental features that may become pull requests, you should look at the base repository.

This repository is no longer compliant with the original surf API, and can no longer be used as a drop in surf replacement.

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

Import the library into your project.

import "github.com/lostinblue/surf"

Quick Start

package main

import (
	"github.com/lostinblue/surf"
	"fmt"
)

func main() {
	browser := surf.NewBrowser()
	err := browser.GET("http://golang.org")
	if err != nil {
		panic(err)
	}

	// Outputs: "The Go Programming Language"
	fmt.Println(browser.Title())
}

About

Less stateful programmatic web browsing in Go.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%