python-user-agents:一个Python库,通过解析(浏览器)用户代理字符串,提供了一种简便的方法来识别手机,平板电脑等设备及其功能

时间:2024-03-12 20:50:02
【文件属性】:

文件名称:python-user-agents:一个Python库,通过解析(浏览器)用户代理字符串,提供了一种简便的方法来识别手机,平板电脑等设备及其功能

文件大小:14KB

文件格式:ZIP

更新时间:2024-03-12 20:50:02

python browser-detection user-agent-detection Python

Python用户代理 user_agents是一个Python库,它通过解析(浏览器/ HTTP)用户代理字符串,提供了一种简便的方法来识别/检测诸如手机,平板电脑之类的设备及其功能。 目标是可靠地检测是否: 用户代理是基于移动设备,平板电脑或PC的设备 用户代理具有触摸功能(具有触摸屏) user_agents依靠出色的来进行原始用户代理字符串的实际解析。 安装 user-agents托管在,可以这样安装: pip install pyyaml ua-parser user-agents 另外,您也可以从获取最新的源代码并手动安装。 用法 可以帮助您识别访问者的各种基本信息可以通过浏览browser , device和os属性来访问。 例如: from user_agents import parse # iPhone's user agent string ua_string


【文件预览】:
python-user-agents-master
----setup.py(1KB)
----.gitignore(63B)
----requirements.txt(125B)
----.travis.yml(252B)
----MANIFEST.in(38B)
----LICENSE.txt(1KB)
----user_agents()
--------compat.py(243B)
--------__init__.py(48B)
--------parsers.py(8KB)
--------devices.json(14KB)
--------tests.py(14KB)
----README.md(7KB)
----AUTHORS.txt(106B)
----MANIFEST(165B)

网友评论