You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two python virtual environments that are installed on the same Mac. And when I try to parse a user agent one virtual environment is giving a different answer than the other. While the envs are not exactly the same I'm surprised to see these outputs.
One environment gives the following (attached requirements file r1)
In [1]: import user_agents
In [2]: user_agent_str = (
...: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 ("
...: "KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
...: )
In [3]: user_agents.parse(user_agent_str).device
Out[3]: Device(family='Other', brand=None, model=None)
The second environment gives (requirements file r2)
>>> import user_agents
>>> user_agent_str = (
... "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 ("
... "KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
... )
>>> user_agents.parse(user_agent_str).device
Device(family='Mac', brand='Apple', model='Mac')
>>>
The two requirements files are attached for debugging. Both python environments are running 3.7.4
It is not python-user-agents that parses the string, but uap-python.
I think if you parse the string through it, you will see the difference in it for the two environments
I have two python virtual environments that are installed on the same Mac. And when I try to parse a user agent one virtual environment is giving a different answer than the other. While the envs are not exactly the same I'm surprised to see these outputs.
One environment gives the following (attached requirements file
r1
)The second environment gives (requirements file
r2
)The two requirements files are attached for debugging. Both python environments are running 3.7.4
requirements_files.zip
The text was updated successfully, but these errors were encountered: