Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

TeaWeb/uaparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

User Agent Parser For TeaWeb

More faster than other implementations.

Usage

p, err := uaparser.NewParser("/path/to/regexes.yaml")
if err != nil {
    log.Println(err.Error())
    return
}

agent, found := p.Parse("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.59 Safari/537.36")

if found {
    log.Printf("%#v,\n %#v, \n %#v", agent.Browser, agent.OS, agent.Device)
}

Links

Releases

No releases published

Packages

No packages published

Languages