Giter Site home page Giter Site logo

taotaojiangshui / yauaa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nielsbasjes/yauaa

0.0 0.0 0.0 9.93 MB

Yet Another UserAgent Analyzer

Home Page: https://yauaa.basjes.nl

License: Apache License 2.0

ANTLR 2.95% Java 85.80% Shell 9.41% Dockerfile 0.31% HTML 0.35% JavaScript 0.42% CSS 0.45% Ruby 0.32%

yauaa's Introduction

Yauaa: Yet Another UserAgent Analyzer

Travis Build status Coverage Status Quality Gate License Maven Central If this project has business value for you then don't hesitate to support me with a small donation.

This is a java library that tries to parse and analyze the useragent string and extract as many relevant attributes as possible.

The full documentation can be found here https://yauaa.basjes.nl

HIGH Profile release notes:

Version 5.8

The detection for Microsoft Edge now no longer reports the 'EdgeHtml' version as if it is the version of 'Edge' itself. Microsoft made a mess of things again.

Version 5.6

In version 5.6 the number of detected DeviceBrands is greatly increased. The detection system for the DeviceBrand has been rewritten and as a consequence both the memory usage and the time needed for the analysis have been decreased.

Version 5.5

With Google Chrome 70 the useragent string pattern has been changed on Android ( https://www.chromestatus.com/feature/4558585463832576 ) . As a consequence the detection of the DeviceBrand failed and you always get "Unknown". This has been fixed in Yauaa 5.5.

Version 5.1 is bad.

If you are using version 5.1 you should upgrade IMMEDIATELY because 5.1 crashes over specific useragent patterns caused by a simple packaging mistake.

Mozilla/1.2.3 (http://basjes.nl)

Blog post

A bit more background about this useragent parser can be found in this blog which I wrote about it: https://techlab.bol.com/making-sense-user-agent-string/

Example output

As an example the useragent of my phone:

Mozilla/5.0 (Linux; Android 7.0; Nexus 6 Build/NBD90Z) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.124 Mobile Safari/537.36

is converted into this set of fields:

Field name Value
Device Class Phone
Device Name Google Nexus 6
Device Brand Google
Operating System Class Mobile
Operating System Name Android
Operating System Version 7.0
Operating System Name Version Android 7.0
Operating System Version Build NBD90Z
Layout Engine Class Browser
Layout Engine Name Blink
Layout Engine Version 53.0
Layout Engine Version Major 53
Layout Engine Name Version Blink 53.0
Layout Engine Name Version Major Blink 53
Agent Class Browser
Agent Name Chrome
Agent Version 53.0.2785.124
Agent Version Major 53
Agent Name Version Chrome 53.0.2785.124
Agent Name Version Major Chrome 53

Try it!

You can try it online with your own browser here: https://try.yauaa.basjes.nl/.

NOTES

  1. This runs under a "Free quota" on Google AppEngine. If this quota is exceeded then it will simply become unavailable for that day.
  2. After a while of inactivity the instance is terminated so the first page may take 15-30 seconds to load.
  3. If you really like this then run it on your local systems. It's much faster that way.

Related projects

Stefano Balzarotti is putting a lot of effort into porting Yauaa to run in .NET standard.

You can track his efforts here on Github: Yauaa .NET standard and download his releases via Nuget.

Donations

If this project has business value for you then don't hesitate to support me with a small donation.

Donations via PayPal

License

Yet Another UserAgent Analyzer
Copyright (C) 2013-2019 Niels Basjes

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

yauaa's People

Contributors

nielsbasjes avatar pawel-piecyk avatar bkersbergen avatar selli96 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.