Browser Detection Python / mod_python?

Posted by cka on Stack Overflow See other posts from Stack Overflow or by cka
Published on 2009-11-06T19:38:41Z Indexed on 2010/03/12 16:27 UTC
Read the original article Hit count: 521

I want to keep some statistics about users and locations in a database. For instance, I would like to store "Mozilla","Firefox","Safari","Chrome","IE", etc... as well as the versions, and possibly the operating system.

What I am trying to locate from Python is this string;

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.14) Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14

Is there an efficient way to use Python or mod_python to detect the http user agent/browser?

© Stack Overflow or respective owner

Related posts about python

Related posts about browser-detection