Created
August 8, 2018 09:45
-
-
Save rleyton/cfa82b9b312f518f4ece3840afb470df to your computer and use it in GitHub Desktop.
Parse a UA stream and print out the key info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ua_parser import user_agent_parser | |
import fileinput | |
for line in fileinput.input(): | |
parsed=user_agent_parser.ParseUserAgent(line) | |
print("%s:%s" % (parsed['family'],parsed['major'])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment