What is the best method to parse a User-Agent string in Python to reliably detect
- Browser
- Browser version
- OS
Or perhaps any helper library that does it
What is the best method to parse a User-Agent string in Python to reliably detect
Or perhaps any helper library that does it
The other responses to this question are rather old now. I believe the new standard in Browser User Agent parsing is Browserscope's user agent parser.
Also conveniently available with the exact same matching patterns in many other languages. Someday you might want to also parse some UA strings in JavaScript and you don't need to worry about inconsistent parsing.