useragents

package module
v0.0.0-...-98dbbf5 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: GPL-3.0 Imports: 5 Imported by: 1

README

Useragents

Scrapes the most common useragents from useragents.me and returns a random one of them when asked for.

Usage

import (
	"git.0x0001f346.de/andreas/useragents"
)

fmt.Println(useragents.GetRandomUserAgent()) // Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllUseragents

func GetAllUseragents() []string

GetAllUseragents returns all available useragents

func GetRandomUseragent

func GetRandomUseragent() string

GetRandomUseragent returns a random useragent

func RenewUseragents

func RenewUseragents()

RenewUseragents scrapes a fresh list of useragents

Types

This section is empty.

Jump to

Keyboard shortcuts

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