uap-python icon indicating copy to clipboard operation
uap-python copied to clipboard

UserAgentParser does not support patch_minor, but patch_minor is supported in uap-core

Open geoffblack opened this issue 4 years ago • 0 comments

The string 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36' should parse out to

{
    'family': 'Chrome',
    'major': '41',
    'minor': '0',
    'patch': '2272',
    'patch_minor': '104'
}

but, instead, we get:

{
    'family': 'Chrome',
    'major': '41',
    'minor': '0',
    'patch': '2272'
}

User Agent patch_minor is already supported in uap-core; see https://github.com/ua-parser/uap-core/issues/22 and https://github.com/ua-parser/uap-core/pull/322/ for an example.

UserAgentParser.Parse and _ParseUserAgent should be updated to support User Agent patch_minor, as well.

geoffblack avatar Aug 31 '22 17:08 geoffblack