解析HTTP用户代理字符串 [英] Parsing HTTP User-Agent string
本文介绍了解析HTTP用户代理字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Python中解析用户代理字符串以便可靠检测的最佳方法是什么
What is the best method to parse a User-Agent string in Python to reliably detect
- 浏览器
- 浏览器版本
- 操作系统
或者是任何帮助它的助手库
Or perhaps any helper library that does it
推荐答案
回答我自己的问题;)
最后我决定去建议#1即写自己的。我对结果感到满意。请随时使用/修改/发送补丁等。
Finally I decided to go by suggestion#1 i.e. write your own. And I am happy with the outcome. Please feel free to use/modify/send me patch etc.
它在这里 - > http://pypi.python.org/pypi/httpagentparser
这篇关于解析HTTP用户代理字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文