File: simple_test.py

package info (click to toggle)
python-ua-parser 0.18.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 212 kB
  • sloc: python: 852; makefile: 39; sh: 7
file content (9 lines) | stat: -rw-r--r-- 254 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
from ua_parser import user_agent_parser
import pprint


pp = pprint.PrettyPrinter(indent=4)
ua_string = 'Apache/2.4.25 (Debian) (internal dummy connection)'
parsed_string = user_agent_parser.ParseOS(ua_string)

assert parsed_string['family'] == 'Debian'