I am trying to get list of browsers from the User-Agent strings in HTTP header. In many of the strings, the browser info is the second entry in the string, like the following:
(compatible;.MSIE.8.0;.Windows.NT.5.1;.Trident/4.0)
But in some of the strings, there is either no browser info, or the info comes as the 3rd entry like in the followings:
(Macintosh;.Intel.Mac.OS.X.10_6_1;.U;.so)
(Macintosh;.Intel.Mac.OS.X.10_6_1;.so)
How to approach this? Is there anything in Python for handling HTTP header fields? Many thanks.