快速可靠的python用户代理解析器。

uasparser2的Python项目详细描述


快速可靠的用户代理解析器。

易于使用

from uasparser2 import UASparser

uas_parser = UASparser('/path/to/your/cache/folder', mem_cache_size=1000)

result = uas_parser.parse('YOUR_USERAGENT_STRING')

# If input data is not avaible in cache folde, UASparser will download and prepare it on init.
# Force data update by calling:

uas_parser.updateData()

快速

Parsing 100,000 real user agents (10,000 unique):

original uasparser: 7264.2 sec
uasparser2 without cache: 171.7 sec
uasparser2 with cache(size 1000): 34.6 sec

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
哦,我需要在这里重建Java吗?   java在按键后做一些事情(但需要等待一点)   java迭代ArrayList的泛型类型<User>   Android Studio和WebStorm之间的java语言级别不一致   java如何在复杂模型中使用@valid注释   Java字符串初始化为基元类型   java外键级联删除在OpenJPA/Postgresql中未按预期工作   java运行时堆分析;匹配模式的字符串何时初始化   java Selenium webdriver我无法将webdriver设置为Firefox I   java服务器发送事件(SSE)和Jetty(编程设置)   linux java。lang.NullPointerException和返回代码   OpenGL VBO多维数据集未正确渲染(Java、LWJGL)   java JavaFX如何将图形“裁剪”到按钮   java数据库插入未向表中添加数据   java在字符串数组中添加数字   在java中识别一串字符串中的编号系统/序列/模式