gofaquest

package module
v0.0.0-...-7dc1e17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2018 License: GPL-3.0 Imports: 9 Imported by: 1

README

Gofaquest reusable high-performance HTTP downloader for downloading web pages, interface interactions, etc. It support common HTTP/HTTPS request(get,post,put and etc.) and Google headless chrome puppeteer.

中文文档

Dependency

To use gofaquest, just need to do this:

go get github.com/Anderson-Lu/gofaquest

Setup Proxy

Sometimes, we need to request certain interfaces and pages through the proxy. Here, I encapsulate the native proxy settings, making it easier and more convenient to set up the proxy. You can set the proxy information directly in the following ways:

func ProxyDemo() {
  request := gofaquest.NewGoFaquest()
  request.SetUrl("http://www.baidu.com")
  request.SetProxy("127.0.0.1", "1080", "anderson", "helloworld")
  request.SetUserAgent(gofaquest.Chrome.Latest())
  result := request.Get()
  fmt.Println(result)
}

Note that if the proxy does not need to set a username and password, the corresponding argument can be passed an empty string.

Setup UserAgent

In some crawler scenarios, we need to switch proxy strings from time to time. For example, using IE proxy or Google proxy, Gofaquest provides common user proxy strings for IE and Chrome, and supports user-defined User-Agent. ,code show as below:

func UserAgentDemo() {
  request := gofaquest.NewGoFaquest()
  request.SetUrl("http://www.baidu.com")
  request.SetUserAgent(gofaquest.Chrome.Latest())
  result := request.Get()
  fmt.Println(result)
}

We provide two constants gofaquest.Chrome and gofaquest.IE to maintain common proxy strings, and provide two methods Latest() and Random() to get the latest proxy string. And random proxy strings.

Gofaquest provides two methods: SetCookie(key,value string) and SetCookies(keyValues ​​...string) to set the cookie information of the request. It is very convenient:

func CookieDemo() {
  request := gofaquest.NewGoFaquest()
  request.SetUrl("http://www.baidu.com")
  request.SetCookie("key","value")
  request.SetCookies("key1","value1","key2","value2","key3","value3")
  result := request.Get()
  fmt.Println(result)
}

Setup Header

SetHeaders(key string, value interface{}) allows you to set the header information of the request very conveniently, and supports direct setting of numbers, strings and even object type data, avoiding repeated data type conversion operations.

func HeaderDemo() {
  request := gofaquest.NewGoFaquest()
  request.SetUrl("http://www.baidu.com")
  request.SetHeaders("name", 123456)
  request.SetHeaders("token", "abcde")
  request.SetHeaders("user-info", struct {Name string}{Name: "Anderson"})
  result := request.Get()
  fmt.Println(result)
}

Setup Content-Type

Sometimes, we need to set the content type property of the request, such as application/x-www-form-urlencoded and application/json;charset=UTF-8.

request.SetContentType("application/x-www-form-urlencoded")

SetUp Params

To set the parameters, we usually set them by url.Values. In gofaquest, we can set them directly by SetParams(key,value), which supports setting different types of data directly. We will automatically set non-characters. The string data is converted to a string, and the object is serialized and converted to the corresponding JSON data.

func ParamsDemo() {
  request := gofaquest.NewGoFaquest()
  request.SetUrl("http://www.baidu.com")
  request.SetFormParams("param1","value1")
  request.SetFormParams("param2",1000)
  request.SetFormParams("param3",struct {Name string}{Name: "Anderson"})
  result := request.Get()
  fmt.Println(result)
}

Also, if you want to add json data to request body, use the request.SetBodyJson() method instead and set content type to application/json;charset=UTF-8

Disable TLSVerify

request.DisableTLSVerify()

Setup retry times

Sometimes, we may need to retry the request because of some network problems.

request.SetRetryTimes(30)

Setup request timeout

request.SetTimeout(time.Second*10)

Setup Puppeteer

In some spiders, we need to mock chrome to download some web pages, and gofaquest support interaction between golang and puppeteer. In this case, you just need to setup like this:

request.SetPuppeteer("puppeteer_host","puppeeter_port","page_url")

And use this to get response:

resp := request.Puppeteer()

And if you want to learn how to use puppeteer, you can visit https://github.com/GoogleChrome/puppeteer. Also, I provide a sample downloader.js. And how to run a puppeteer server via docker? just run the following code:

docker run --rm --shm-size 1G --name puppeteer_downloader -v downloader.js:/app/index.js --privileged=true -p 48000:15400 alekzonder/puppeteer

Setup Method

func (self *GoFaquest) Get() *Result
func (self *GoFaquest) Post() *Result
func (self *GoFaquest) Put() *Result
func (self *GoFaquest) Patch() *Result
func (self *GoFaquest) Delete() *Result
func (self *GoFaquest) Copy() *Result
func (self *GoFaquest) Head() *Result
func (self *GoFaquest) Options() *Result
func (self *GoFaquest) Link() *Result
func (self *GoFaquest) Unlink() *Result
func (self *GoFaquest) Purge() *Result
func (self *GoFaquest) Lock() *Result
func (self *GoFaquest) Unlock() *Result
func (self *GoFaquest) Propfind() *Result
func (self *GoFaquest) View() *Result
func (self *GoFaquest) Puppeteer() *Result 

Response

The result of all requests will be returned by *Result, which has the following structure:

type Result struct {
  Value []byte
  Error error
  Cost  int64
}

Here Value is the returned byte array data, Cost is time consuming. For data parsing, you can parse the data directly using json.Unmarshal(), or use Gofasion to parse the data more easily.

Documentation

Index

Constants

View Source
const (
	FAQUEST_METHOD_UNSET = iota
	FAQUEST_METHOD_GET
	FAQUEST_METHOD_POST
	FAQUEST_METHOD_PUT
	FAQUEST_METHOD_PATCH
	FAQUEST_METHOD_DELETE
	FAQUEST_METHOD_COPY
	FAQUEST_METHOD_HEAD
	FAQUEST_METHOD_OPTIONS
	FAQUEST_METHOD_LINK
	FAQUEST_METHOD_UNLINK
	FAQUEST_METHOD_PURGE
	FAQUEST_METHOD_LOCK
	FAQUEST_METHOD_UNLOCK
	FAQUEST_METHOD_PROPFIND
	FAQUEST_METHOD_VIEW
)

Variables

View Source
var (
	ERROR_METHOD_NOT_FOUND = fmt.Errorf("gofaquest error: invalid request method,please setup first")
)
View Source
var FAQUEST_METHOD_MAP = map[int]string{
	1:  "GET",
	2:  "POST",
	3:  "PUT",
	4:  "PATCH",
	5:  "DELETE",
	6:  "COPY",
	7:  "HEAD",
	8:  "OPTIONS",
	9:  "LINK",
	10: "UNLINK",
	11: "PURGE",
	12: "LOCK",
	13: "UNLOCK",
	14: "PROPFIND",
	15: "VIEW",
}

Functions

This section is empty.

Types

type GoFaquest

type GoFaquest struct {
	// contains filtered or unexported fields
}

* Gofaquest(Golang Fast Request) is a high-performance http request pool service for golang. * retryTimes is used to setup retry time for specific request and min times is 0

func NewGoFaquest

func NewGoFaquest() *GoFaquest

* Create a instance for gofaquest

func (*GoFaquest) Copy

func (self *GoFaquest) Copy() *Result

func (*GoFaquest) Delete

func (self *GoFaquest) Delete() *Result

func (*GoFaquest) DisableTLSVerify

func (self *GoFaquest) DisableTLSVerify()

* Disable CLS verify

func (*GoFaquest) Get

func (self *GoFaquest) Get() *Result

func (*GoFaquest) Head

func (self *GoFaquest) Head() *Result
func (self *GoFaquest) Link() *Result

func (*GoFaquest) Lock

func (self *GoFaquest) Lock() *Result

func (*GoFaquest) Options

func (self *GoFaquest) Options() *Result

func (*GoFaquest) Patch

func (self *GoFaquest) Patch() *Result

func (*GoFaquest) Post

func (self *GoFaquest) Post() *Result

func (*GoFaquest) Propfind

func (self *GoFaquest) Propfind() *Result

func (*GoFaquest) Puppeteer

func (self *GoFaquest) Puppeteer() *Result

func (*GoFaquest) Purge

func (self *GoFaquest) Purge() *Result

func (*GoFaquest) Put

func (self *GoFaquest) Put() *Result

func (*GoFaquest) SetBodyJson

func (self *GoFaquest) SetBodyJson(jsonData string)

* Setup body data

func (*GoFaquest) SetContentType

func (self *GoFaquest) SetContentType(typeStr string)

func (*GoFaquest) SetCookie

func (self *GoFaquest) SetCookie(key string, value string)

* Setup cookies for request

func (*GoFaquest) SetCookies

func (self *GoFaquest) SetCookies(kvs ...string)

* Setup cookies for request

func (*GoFaquest) SetFormParams

func (self *GoFaquest) SetFormParams(key string, value interface{})

* Setup params for request

func (*GoFaquest) SetHeaders

func (self *GoFaquest) SetHeaders(key string, value interface{})

* Setup headers for request

func (*GoFaquest) SetProxy

func (self *GoFaquest) SetProxy(host string, port string, username string, password string)

* Setup proxy

func (*GoFaquest) SetPuppeteer

func (self *GoFaquest) SetPuppeteer(host string, port string, pageUrl string)

* Setup puppeteer server

func (*GoFaquest) SetRetryTimes

func (self *GoFaquest) SetRetryTimes(maxRetryTimes int)

* Setup maxRetry time and default is 1

func (*GoFaquest) SetTimeout

func (self *GoFaquest) SetTimeout(duration time.Duration)

func (*GoFaquest) SetUrl

func (self *GoFaquest) SetUrl(url string)

func (*GoFaquest) SetUserAgent

func (self *GoFaquest) SetUserAgent(agent string)
func (self *GoFaquest) Unlink() *Result

func (*GoFaquest) Unlock

func (self *GoFaquest) Unlock() *Result

func (*GoFaquest) View

func (self *GoFaquest) View() *Result

type Proxy

type Proxy struct {
	Enable   bool
	Host     string
	Port     string
	Username string
	Password string
}

* Proxyinfo for Gofaquest

func (*Proxy) Valid

func (self *Proxy) Valid() bool

type Puppeteer

type Puppeteer struct {
	Host string
	Port string
	Page string
}

* Puppeteer server setting

type Result

type Result struct {
	Value []byte
	Error error
	Cost  int64
}

* Result stores request result bytes or error if occours

func (*Result) CostMillseconds

func (self *Result) CostMillseconds() int64

func (*Result) Scan

func (self *Result) Scan(target interface{}) error

type UserAgents

type UserAgents []string
var Chrome UserAgents = UserAgents{
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
	"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36",
	"Mozilla/5.0 (Windows NT 5.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 4.4.2; XMP-6250 Build/HAWK) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36 ADAPI/2.0 (UUID:9e7df0ed-2a5c-4a19-bec7-2cc54800f99d) RK3188-ADAPI/1.2.84.533 (MODEL:XMP-6250)",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 6.0.1; SM-G532G Build/MMB29T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.83 Mobile Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 6.0; vivo 1713 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.124 Mobile Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
	"Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 7.1; Mi A1 Build/N2G47H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Windows NT 5.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 6.0.1; vivo 1603 Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 6.0.1; CPH1607 Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36",
	"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36",
	"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36",
	"Mozilla/5.0 (Linux; Android 6.0.1; Redmi 4A Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/60.0.3112.116 Mobile Safari/537.36",
	"Mozilla/5.0 (Windows NT 6.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",
}
var IE UserAgents = UserAgents{
	"Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1)",
	"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)",
	"Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)",
	"Mozilla/5.0 (Windows NT 6.1; Win64; x64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)",
	"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
	"Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)",
	"Mozilla/5.0 (Windows NT 6.2; Win64; x64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 6.2; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; WOW64; Trident/5.0)",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)",
	"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; MDDSJS; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; wbx 1.0.0)",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; Xbox)",
	"Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)",
	"Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/7.0)",
	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)",
	"Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)",
	"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.2; WOW64; Trident/7.0)",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2)",
	"Mozilla/5.0 (Windows NT 6.3; Win64; x64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)",
	"Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)",
	"Mozilla/5.0 (Windows NT 6.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Win64; x64; Trident/6.0)",
	"Mozilla/5.0 (Windows NT 6.3; Win64, x64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/5.0 (Windows NT 5.1; WOW64; Trident/7.0; rv:11.0) like Gecko",
	"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)",
	"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)",
}

func (UserAgents) Latest

func (self UserAgents) Latest() string

func (UserAgents) Random

func (self UserAgents) Random() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL