Skip to content

newparser: nielsbasjes/yauaa #183

@nielsbasjes

Description

@nielsbasjes

https://github.com/nielsbasjes/yauaa

Simplest way to run it from a non-Java language is by running the demo servlet with this engine:

Download the prebuilt servlet https://repo1.maven.org/maven2/nl/basjes/parse/useragent/yauaa-webapp/5.12/yauaa-webapp-5.12.war

Start it

java -jar yauaa-webapp-5.12.war

Then initialize the engine (this is a demo servlet)

curl http://localhost:8080/json/

Repeat this until this returns something different than {} (takes a few seconds):
The system is now running.

Then do a real request:

$ curl -A "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"  http://localhost:8080/json/

Which results in something like this

{
    "DeviceClass":"Desktop",
    "DeviceBrand":"Unknown",
    "DeviceName":"Linux Desktop",
    "OperatingSystemClass":"Desktop",
    "OperatingSystemName":"Linux",
    "OperatingSystemVersion":"Intel x86_64",
    "OperatingSystemVersionMajor":"Intel x86",
    "OperatingSystemNameVersion":"Linux Intel x86_64",
    "OperatingSystemNameVersionMajor":"Linux Intel x86",
    "LayoutEngineClass":"Browser",
    "LayoutEngineName":"Blink",
    "LayoutEngineVersion":"76.0",
    "LayoutEngineVersionMajor":"76",
    "LayoutEngineNameVersion":"Blink 76.0",
    "LayoutEngineNameVersionMajor":"Blink 76",
    "AgentClass":"Browser",
    "AgentName":"Chrome",
    "AgentVersion":"76.0.3809.100",
    "AgentVersionMajor":"76",
    "AgentNameVersion":"Chrome 76.0.3809.100",
    "AgentNameVersionMajor":"Chrome 76",
    "DeviceCpu":"Intel x86_64",
    "DeviceCpuBits":"64",
    "Useragent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/76.0.3809.100 Safari\/537.36"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions