0

I am looking for a user-agent parser in python that if passed a user agent such as the below, it will provide OS, browser type but most import the device type e.g. desktop/laptop versus tablet or mobile and if possible what kind..such as android, iPhone, nokia etc.

Is there such a parser or python libary before I go off and build by own?

user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0,gzip(gfe)"
Tampa
  • 75,446
  • 119
  • 278
  • 425
  • Does this answer your question? [Parsing HTTP User-Agent string](https://stackoverflow.com/questions/927552/parsing-http-user-agent-string) – Favonius Jan 04 '22 at 16:08

1 Answers1

1

The top answer to Parsing HTTP User-Agent string has a python parser. If it doesn't do exactly what you want it should be easy enough to modify.

Community
  • 1
  • 1
Tim
  • 11,710
  • 4
  • 42
  • 43