Skip to content

patch_minor is not being parsed for the Opera and Vivaldi UAs #654

Description

@mindaugl

For the Opera and Vivaldi brands, parsed user agents do not include patch_minor component.

To reproduce using Python, e.g., for the Vivaldi:

>>> from ua_parser import parse_user_agent
>>> ua_string = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Vivaldi/7.9.3970.45"
>>> parse_user_agent(ua_string)

returns:
"UserAgent(family='Vivaldi', major='7', minor='9', patch='3970', patch_minor=None)"

ua-parser/uap-python#311

As mentioned by Makslinn, this is due to the Vivaldi (and Opera) regex having only 4 capturing groups:

- regex: '(Vivaldi)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)'

Regex should be updated to have 5 capturing groups (e.g., like Edge).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions