fake_useragent

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 4 Imported by: 0

README

fake-useragent

Go library A wide variety of random useragent.

Support

  • All User-Agent Random
  • Chrome
  • Edge
  • Firefox
  • Safari

Installation

$ go get github.com/ForrestSu/fake-useragent

Usage

package main

import (
	"log"

	browser "github.com/ForrestSu/fake-useragent"
)

func main() {
	// recommend to use
	random := browser.Random()
	log.Printf("Random: %s", random)

	chrome := browser.Chrome()
	log.Printf("Chrome: %s", chrome)
}

Output

Random: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Chrome: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Documentation

Index

Constants

View Source
const (
	CHROME  = "chrome"
	EDGE    = "edge"
	FIREFOX = "firefox"
	SAFARI  = "safari"
)

major browsers

Variables

This section is empty.

Functions

func Chrome

func Chrome() string

Chrome useragent

func Edge

func Edge() string

Edge useragent

func Firefox

func Firefox() string

Firefox useragent

func Random

func Random() string

Random useragent

func Safari

func Safari() string

Safari useragent

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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