Open miketaylr opened 10 years ago
Thanks for the report.
Does Firefox also have a version for tablet devices? I just want to make sure that we can properly differentiate between tablet and mobile Firefoxes.
Never mind my question. I saw this issue before #6
I guess we can close this as fixed!
>>> from user_agents import parse
>>> ua = 'Mozilla/5.0 (Android 4.4.4; Mobile; rv:44.0) Gecko/44.0 Firefox/44.0'
>>> user_agent = parse(ua)
>>> # Accessing user agent's browser attributes
... user_agent.browser
Browser(family='Firefox Mobile', version=(44,), version_string='44')
>>> user_agent.browser.family
'Firefox Mobile'
>>> user_agent.browser.version
(44,)
>>> user_agent.browser.version_string
'44'
>>>
>>> # Accessing user agent's operating system properties
... user_agent.os
OperatingSystem(family='Android', version=(4, 4, 4), version_string='4.4.4')
>>> user_agent.os.family
'Android'
>>> user_agent.os.version
(4, 4, 4)
>>> user_agent.os.version_string
'4.4.4'
>>>
>>> # Accessing user agent's device properties
... user_agent.device
Device(family='Generic Smartphone', brand='Generic', model='Smartphone')
>>> user_agent.device.family
'Generic Smartphone'
>>> user_agent.device.brand
'Generic'
>>> user_agent.device.model
'Smartphone'
>>>
>>> # Viewing a pretty string version
... str(user_agent)
'Generic Smartphone / Android 4.4.4 / Firefox Mobile 44'
>>> # Viewing a pretty string version
... str(user_agent)
'Generic Smartphone / Android 4.4.4 / Firefox Mobile 44'
>>> user_agent.is_touch_capable
True
>>> user_agent.is_tablet
False
>>> user_agent.is_mobile
True
Hi there,
A few issues with Firefox for Android user agents:
is_tablet
should be false,is_mobile
should be true.