快速可靠的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