Skip to content

Commit

Permalink
Fix #271: add Google user-agent on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
broggeri committed Sep 17, 2018
1 parent 23bfabe commit dc36598
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ user_agent_parsers:
family_replacement: 'Bon Echo'

# @note: iOS / OSX Applications
- regex: '(iPod|iPhone|iPad).+GSA/(\d+)\.(\d+)\.(\d+) Mobile'
family_replacement: 'Google'
- regex: '(iPod|iPhone|iPad).+Version/(\d+)\.(\d+)(?:\.(\d+))?.*[ +]Safari'
family_replacement: 'Mobile Safari'
- regex: '(iPod|iPod touch|iPhone|iPad);.*CPU.*OS[ +](\d+)_(\d+)(?:_(\d+))?.* AppleNews\/\d+\.\d+\.\d+?'
Expand Down
6 changes: 6 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7691,3 +7691,9 @@ test_cases:
minor:
patch:

- user_agent_string: 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_0_2 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) GSA/36.0.169645775 Mobile/15A421 Safari/604.1'
family: 'Google'
major: '36'
minor: '0'
patch: '169645775'

0 comments on commit dc36598

Please sign in to comment.