Closed declension closed 6 years ago
Solved - this is Python2, forgot to make that a unicode string, so
ua_string = u'Mozilla/5.0 (Linux; Android 4.4.2; P80 3G四核 (B1KC) Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Safari/537.36'
user_agent = user_agents.parse(ua_string)
does in fact work :smile:
So sorry, my mistake - but leaving here in case anybody runs into the same problem...
With Python 2.7 and
user-agents
== 1.1.0, we're seeing exceptions with non-ASCII device names, e.g. this minimal code snippet:results in:
Any ideas? Thanks