Skip to content

Commit

Permalink
feat: improved alias device parser
Browse files Browse the repository at this point in the history
chore: update device and client indexes
  • Loading branch information
sanchezzzhak committed Oct 30, 2023
1 parent e5fdeb3 commit eff87c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions regexes/device/alias-device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
- regex: 'dv\(([^)]+)\);pr\(UCBrowser/'
name: '$1'

# iPhone/iPad/iPod code devices
- regex: '[\( ]iP(hone|[ao]d)(\d{1,2}),(\d{1,2});'
name: 'iP$1$2,$3'

# MS Office Apple
- regex: '(?:Non)?AppStore; Apple/(.*?)\)'
name: '$1'
Expand Down
16 changes: 16 additions & 0 deletions tests/fixtures/devices/alias_devices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,3 +401,19 @@
user_agent: 'Mozilla/5.0 (Linux; Android 8.1.0; HT16 Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 Mobile Safari/537.36[FBAN/EMA;FBLC/ar_AR;FBAV/305.0.0.12.106;]'
alias:
name: HT16
-
user_agent: Mozilla/5.0 (iPhone5,4; iPhone; U; CPU OS 7_0_6 like Mac OS X; de_DE) com.google.GooglePlus/29676 (KHTML, like Gecko) Mobile/N49AP (gzip)
alias:
name: iPhone5,4
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E302 Instagram 46.0.0.14.96 (iPad6,11; iOS 11_3_1; en_150; en-150; scale=2.00; gamut=normal; 960x640)
alias:
name: iPad6,11
-
user_agent: 'gamed/5.11.20.4.9.17.5.5.2 (iPad4,4; 12.4.8; 16G201; GameKit-577.8)'
alias:
name: iPad4,4
-
user_agent: Mozilla/5.0 (iPod touch; CPU iPhone OS 10_1_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100 Instagram 46.0.0.14.96 (iPod7,1; iOS 10_1_1; pt_PT; pt-PT; scale=2.00; gamut=normal; 640x1136)
alias:
name: iPod7,1

0 comments on commit eff87c8

Please sign in to comment.