Skip to content

YaSearchBrowser UA is mis-detected as Chrome — bundled uap-core is outdated #270

@GeorgiySurkov

Description

@GeorgiySurkov

Package: ua-parser 1.0.1 (PyPI, released Feb 1 2025)
Issue: UA strings containing the token YaSearchBrowser are incorrectly parsed as Chrome instead of Yandex Browser.


Example

ua = (
    "Mozilla/5.0 (Linux; Android 10; TECNO LC7 Build/QP1A.190711.020) "
    "AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.117 "
    "Mobile Safari/537.36 YaApp_Android/9.02 YaSearchBrowser/9.02"
)

from ua_parser import parse
print(parse(ua).user_agent.family)
# → 'Chrome'      ← should be 'Yandex Browser'

Root cause

  • The package still bundles uap-core at commit d668d6c (uap-core v0.18.0, merged Feb 2024).
  • Support for YaSearchBrowser was added later in fix: update yandex browser regex uap-core#578 (April 2024) along with test coverage.
  • These UA strings now match the generic Chrome regex before reaching the Yandex-specific rule.

Suggested fix

  1. Update the embedded regexes.yaml to the latest uap-core (any commit after PR #578).
  2. Release a patch version (e.g. 1.0.2) to deliver the fix downstream.
  3. Optionally: add the UA string above as a test case to prevent future regressions.

Thanks for maintaining the project!

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