Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samsung GT-P3113 and SM-T110 is identified as Generic #70

Open
gitclem opened this issue Nov 23, 2016 · 1 comment
Open

Samsung GT-P3113 and SM-T110 is identified as Generic #70

gitclem opened this issue Nov 23, 2016 · 1 comment

Comments

@gitclem
Copy link

gitclem commented Nov 23, 2016

I'm guessing that these two regex in regexes.yaml should have worked but don't appear to do so.

  - regex: '; *(SAMSUNG-)?(GT\-[BINPS]\d{4}[^\/]*)(\/[^ ]*) Build'

  - regex: '; *((?:SCH|SGH|SHV|SHW|SPH|SC|SM)\-[A-Za-z0-9 ]+)(/?[^ ]*)? Build'

These are the failing cases:

>>> ua_string = "Mozilla/5.0 Linux U Android 4.2.2 es-us GT-P3113 Build/JDQ39 AppleWebKit/534.30 KHTML like Gecko Version/4.0 Safari/534.30"
>>> parsed_string = user_agent_parser.Parse(ua_string)
>>> pp.pprint(parsed_string)
{   'device': {   'brand': 'Generic',
                  'family': 'Generic Smartphone',
                  'model': 'Smartphone'},
    'os': {   'family': 'Android',
              'major': '4',
              'minor': '2',
              'patch': '2',
              'patch_minor': None},
    'string': 'Mozilla/5.0 Linux U Android 4.2.2 es-us GT-P3113 Build/JDQ39 AppleWebKit/534.30 KHTML like Gecko Version/4.0 Safari/534.30',
    'user_agent': {   'family': 'Android',
                      'major': '4',
                      'minor': '2',
                      'patch': '2'}}

>>> ua_string = "Mozilla/5.0 Linux Android 4.2.2 SM-T110 Build/JDQ39 AppleWebKit/537.36 KHTML like Gecko Chrome/49.0.2623.91 Safari/537.36"
>>> parsed_string = user_agent_parser.Parse(ua_string)
>>> pp.pprint(parsed_string)
{   'device': {   'brand': 'Generic',
                  'family': 'Generic Smartphone',
                  'model': 'Smartphone'},
    'os': {   'family': 'Android',
              'major': '4',
              'minor': '2',
              'patch': '2',
              'patch_minor': None},
    'string': 'Mozilla/5.0 Linux Android 4.2.2 SM-T110 Build/JDQ39 AppleWebKit/537.36 KHTML like Gecko Chrome/49.0.2623.91 Safari/537.36',
    'user_agent': {   'family': 'Chrome',
                      'major': '49',
                      'minor': '0',
                      'patch': '2623'}}

@jnozsc
Copy link
Contributor

jnozsc commented Feb 8, 2020

it is more likely a upstream issue, please report to https://github.com/ua-parser/uap-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@jnozsc @gitclem and others