surf

Stateful programmatic web browsing in Go.

  • Owner: headzoo/surf
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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.

Main metrics

Overview
Name With Ownerheadzoo/surf
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-08-25 06:29:53
Pushed At2024-01-24 19:54:47
Last Commit At2021-09-08 09:53:22
Release Count22
Last Release Namev1.0.1 (Posted on )
First Release Name0.1 (Posted on )
用户参与
Stargazers Count1.5k
Watchers Count35
Fork Count160
Commits Count358
Has Issues Enabled
Issues Count74
Issue Open Count42
Pull Requests Count35
Pull Requests Open Count14
Pull Requests Close Count19
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private