Http header User-Agent
<p>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:</p>

<pre><code>(compatible;.MSIE.8.0;.Windows.NT.5.1;.Trident/4.0)
</code></pre>

<p>But in some of the strings, there is either no browser info, or the info comes as the 3rd entry like in the followings:</p>

<pre><code>(Macintosh;.Intel.Mac.OS.X.10_6_1;.U;.so)
(Macintosh;.Intel.Mac.OS.X.10_6_1;.so)
</code></pre>

<p>How to approach this? Is there anything in Python for handling HTTP header fields? Many thanks.</p>
