Categorygithub.com/DataHenHQ/useragent
modulepackage
0.1.0
Repository: https://github.com/datahenhq/useragent.git
Documentation: pkg.go.dev

# README

useragent

useragent is a go package that generates a random combination of millions of user-agents strings. Currently used in production at DataHen to crawl/scrape through billions of pages.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Desktop returns a random generated UA for desktop browsers like so: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.4) Chrome/ Safari/530.6 Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.4) Gecko/2008092417 Firefox/3.0.3.
GoogleBot2 returns UA for google bot2.
LoadUAConfig loads UserAgent configuration file.
LoadUAConfigFromBytes loads config from a byte slice.
LoadUAConfigFromFile loads config from a file.
LoadUAConfigFromJSON loads config from a JSON string.
Mobile returns a random generated UA for mobile browsers To do: make proper implementation.

# Structs

Browser browser's user agent configuration.
BrowserVariant represents an user agent configuration for a specific browser variant.
Device device's user agent configuration.
OS operating system's user agent configuration.
OSVariant represents an user agent configuration for a specific operating system variant.
UAConfig user agents configuration.
Variant represents a variant.