useragent_parser 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,829 @@
1
+ user_agent_parsers:
2
+ #### SPECIAL CASES TOP ####
3
+
4
+ # must go before Opera
5
+ - regex: '^(Opera)/(\d+)\.(\d+) \(Nintendo Wii'
6
+ family_replacement: 'Wii'
7
+
8
+ # must go before Firefox to catch SeaMonkey/Camino
9
+ - regex: '(SeaMonkey|Camino)/(\d+)\.(\d+)\.?([ab]?\d+[a-z]*)'
10
+
11
+ # Firefox
12
+ - regex: '(Pale[Mm]oon)/(\d+)\.(\d+)\.?(\d+)?'
13
+ family_replacement: 'Pale Moon (Firefox Variant)'
14
+ - regex: '(Fennec)/(\d+)\.(\d+)\.?([ab]?\d+[a-z]*)'
15
+ family_replacement: 'Firefox Mobile'
16
+ - regex: '(Fennec)/(\d+)\.(\d+)(pre)'
17
+ family_replacement: 'Firefox Mobile'
18
+ - regex: '(Fennec)/(\d+)\.(\d+)'
19
+ family_replacement: 'Firefox Mobile'
20
+ - regex: 'Mobile.*(Firefox)/(\d+)\.(\d+)'
21
+ family_replacement: 'Firefox Mobile'
22
+ - regex: '(Namoroka|Shiretoko|Minefield)/(\d+)\.(\d+)\.(\d+(?:pre)?)'
23
+ family_replacement: 'Firefox ($1)'
24
+ - regex: '(Firefox)/(\d+)\.(\d+)(a\d+[a-z]*)'
25
+ family_replacement: 'Firefox Alpha'
26
+ - regex: '(Firefox)/(\d+)\.(\d+)(b\d+[a-z]*)'
27
+ family_replacement: 'Firefox Beta'
28
+ - regex: '(Firefox)-(?:\d+\.\d+)?/(\d+)\.(\d+)(a\d+[a-z]*)'
29
+ family_replacement: 'Firefox Alpha'
30
+ - regex: '(Firefox)-(?:\d+\.\d+)?/(\d+)\.(\d+)(b\d+[a-z]*)'
31
+ family_replacement: 'Firefox Beta'
32
+ - regex: '(Namoroka|Shiretoko|Minefield)/(\d+)\.(\d+)([ab]\d+[a-z]*)?'
33
+ family_replacement: 'Firefox ($1)'
34
+ - regex: '(Firefox).*Tablet browser (\d+)\.(\d+)\.(\d+)'
35
+ family_replacement: 'MicroB'
36
+ - regex: '(MozillaDeveloperPreview)/(\d+)\.(\d+)([ab]\d+[a-z]*)?'
37
+
38
+ # e.g.: Flock/2.0b2
39
+ - regex: '(Flock)/(\d+)\.(\d+)(b\d+?)'
40
+
41
+ # RockMelt
42
+ - regex: '(RockMelt)/(\d+)\.(\d+)\.(\d+)'
43
+
44
+ # e.g.: Fennec/0.9pre
45
+ - regex: '(Navigator)/(\d+)\.(\d+)\.(\d+)'
46
+ family_replacement: 'Netscape'
47
+
48
+ - regex: '(Navigator)/(\d+)\.(\d+)([ab]\d+)'
49
+ family_replacement: 'Netscape'
50
+
51
+ - regex: '(Netscape6)/(\d+)\.(\d+)\.(\d+)'
52
+ family_replacement: 'Netscape'
53
+
54
+ - regex: '(MyIBrow)/(\d+)\.(\d+)'
55
+ family_replacement: 'My Internet Browser'
56
+
57
+ # Opera will stop at 9.80 and hide the real version in the Version string.
58
+ # see: http://dev.opera.com/articles/view/opera-ua-string-changes/
59
+ - regex: '(Opera Tablet).*Version/(\d+)\.(\d+)(?:\.(\d+))?'
60
+ - regex: '(Opera)/.+Opera Mobi.+Version/(\d+)\.(\d+)'
61
+ family_replacement: 'Opera Mobile'
62
+ - regex: 'Opera Mobi'
63
+ family_replacement: 'Opera Mobile'
64
+ - regex: '(Opera Mini)/(\d+)\.(\d+)'
65
+ - regex: '(Opera Mini)/att/(\d+)\.(\d+)'
66
+ - regex: '(Opera)/9.80.*Version/(\d+)\.(\d+)(?:\.(\d+))?'
67
+
68
+ # Palm WebOS looks a lot like Safari.
69
+ - regex: '(webOSBrowser)/(\d+)\.(\d+)'
70
+ - regex: '(webOS)/(\d+)\.(\d+)'
71
+ family_replacement: 'webOSBrowser'
72
+ - regex: '(wOSBrowser).+TouchPad/(\d+)\.(\d+)'
73
+ family_replacement: 'webOS TouchPad'
74
+
75
+ # LuaKit has no version info.
76
+ # http://luakit.org/projects/luakit/
77
+ - regex: '(luakit)'
78
+ family_replacement: 'LuaKit'
79
+
80
+ # Lightning (for Thunderbird)
81
+ # http://www.mozilla.org/projects/calendar/lightning/
82
+ - regex: '(Lightning)/(\d+)\.(\d+)([ab]?\d+[a-z]*)'
83
+
84
+ # Swiftfox
85
+ - regex: '(Firefox)/(\d+)\.(\d+)\.(\d+(?:pre)?) \(Swiftfox\)'
86
+ family_replacement: 'Swiftfox'
87
+ - regex: '(Firefox)/(\d+)\.(\d+)([ab]\d+[a-z]*)? \(Swiftfox\)'
88
+ family_replacement: 'Swiftfox'
89
+
90
+ # Rekonq
91
+ - regex: 'rekonq'
92
+ family_replacement: 'Rekonq'
93
+
94
+ # Conkeror lowercase/uppercase
95
+ # http://conkeror.org/
96
+ - regex: '(conkeror|Conkeror)/(\d+)\.(\d+)\.?(\d+)?'
97
+ family_replacement: 'Conkeror'
98
+
99
+ # catches lower case konqueror
100
+ - regex: '(konqueror)/(\d+)\.(\d+)\.(\d+)'
101
+ family_replacement: 'Konqueror'
102
+
103
+ - regex: '(WeTab)-Browser'
104
+
105
+ - regex: '(Comodo_Dragon)/(\d+)\.(\d+)\.(\d+)'
106
+ family_replacement: 'Comodo Dragon'
107
+
108
+ # Bots
109
+ - regex: '(YottaaMonitor|BrowserMob|HttpMonitor|YandexBot|Slurp|BingPreview|PagePeeker|ThumbShotsBot|WebThumb|URL2PNG|ZooShot|GomezA|Catchpoint bot|Willow Internet Crawler|Google SketchUp|Read%20Later)'
110
+
111
+ # must go before NetFront below
112
+ - regex: '(Kindle)/(\d+)\.(\d+)'
113
+
114
+ - regex: '(Symphony) (\d+).(\d+)'
115
+
116
+ - regex: 'Minimo'
117
+
118
+ # Chrome Mobile
119
+ - regex: '(CrMo)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
120
+ family_replacement: 'Chrome Mobile'
121
+ - regex: '(CriOS)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
122
+ family_replacement: 'Chrome Mobile iOS'
123
+ - regex: '(Chrome)/(\d+)\.(\d+)\.(\d+)\.(\d+) Mobile'
124
+ family_replacement: 'Chrome Mobile'
125
+
126
+ # Chrome Frame must come before MSIE.
127
+ - regex: '(chromeframe)/(\d+)\.(\d+)\.(\d+)'
128
+ family_replacement: 'Chrome Frame'
129
+
130
+ # UC Browser
131
+ - regex: '(UC Browser)(\d+)\.(\d+)\.(\d+)'
132
+
133
+ # Tizen Browser (second case included in browser/major.minor regex)
134
+ - regex: '(SLP Browser)/(\d+)\.(\d+)'
135
+ family_replacement: 'Tizen Browser'
136
+
137
+ # Epiphany browser (identifies as Chromium)
138
+ - regex: '(Epiphany)/(\d+)\.(\d+).(\d+)'
139
+
140
+ # Sogou Explorer 2.X
141
+ - regex: '(SE 2\.X) MetaSr (\d+)\.(\d+)'
142
+ family_replacement: 'Sogou Explorer'
143
+
144
+ # Pingdom
145
+ - regex: '(Pingdom.com_bot_version_)(\d+)\.(\d+)'
146
+ family_replacement: 'PingdomBot'
147
+
148
+ # Facebook
149
+ - regex: '(facebookexternalhit)/(\d+)\.(\d+)'
150
+ family_replacement: 'FacebookBot'
151
+
152
+ # Twitterbot
153
+ - regex: '(Twitterbot)/(\d+)\.(\d+)'
154
+ family_replacement: 'TwitterBot'
155
+
156
+ #### END SPECIAL CASES TOP ####
157
+
158
+ #### MAIN CASES - this catches > 50% of all browsers ####
159
+
160
+ # Browser/major_version.minor_version.beta_version
161
+ - regex: '(AdobeAIR|Chromium|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Shiira|Sunrise|Chrome|Flock|Netscape|Lunascape|WebPilot|Vodafone|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iris|UP\.Browser|Bunjaloo|Google Earth|Raven for Mac)/(\d+)\.(\d+)\.(\d+)'
162
+
163
+ # Browser/major_version.minor_version
164
+ - regex: '(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|Vodafone|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris|Abrowser)/(\d+)\.(\d+)'
165
+
166
+ # Browser major_version.minor_version.beta_version (space instead of slash)
167
+ - regex: '(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\d+)\.(\d+)\.(\d+)'
168
+ # Browser major_version.minor_version (space instead of slash)
169
+ - regex: '(iCab|Lunascape|Opera|Android|Jasmine|Polaris|BREW) (\d+)\.(\d+)\.?(\d+)?'
170
+
171
+ # weird android UAs
172
+ - regex: '(Android) Donut'
173
+ v1_replacement: '1'
174
+ v2_replacement: '2'
175
+
176
+ - regex: '(Android) Eclair'
177
+ v1_replacement: '2'
178
+ v2_replacement: '1'
179
+
180
+ - regex: '(Android) Froyo'
181
+ v1_replacement: '2'
182
+ v2_replacement: '2'
183
+
184
+ - regex: '(Android) Gingerbread'
185
+ v1_replacement: '2'
186
+ v2_replacement: '3'
187
+
188
+ - regex: '(Android) Honeycomb'
189
+ v1_replacement: '3'
190
+
191
+ # IE Mobile
192
+ - regex: '(IEMobile)[ /](\d+)\.(\d+)'
193
+ family_replacement: 'IE Mobile'
194
+ # desktop mode
195
+ # http://www.anandtech.com/show/3982/windows-phone-7-review
196
+ - regex: '(MSIE) (\d+)\.(\d+).*XBLWP7'
197
+ family_replacement: 'IE Large Screen'
198
+
199
+ # AFTER THE EDGE CASES ABOVE!
200
+ - regex: '(Firefox)/(\d+)\.(\d+)\.(\d+)'
201
+ - regex: '(Firefox)/(\d+)\.(\d+)(pre|[ab]\d+[a-z]*)?'
202
+
203
+ #### END MAIN CASES ####
204
+
205
+ #### SPECIAL CASES ####
206
+ - regex: '(Obigo)InternetBrowser'
207
+ - regex: '(Obigo)\-Browser'
208
+ - regex: '(Obigo|OBIGO)[^\d]*(\d+)(?:.(\d+))?'
209
+
210
+ - regex: '(MAXTHON|Maxthon) (\d+)\.(\d+)'
211
+ family_replacement: 'Maxthon'
212
+ - regex: '(Maxthon|MyIE2|Uzbl|Shiira)'
213
+ v1_replacement: '0'
214
+
215
+ - regex: '(PLAYSTATION) (\d+)'
216
+ family_replacement: 'PlayStation'
217
+ - regex: '(PlayStation Portable)[^\d]+(\d+).(\d+)'
218
+
219
+ - regex: '(BrowseX) \((\d+)\.(\d+)\.(\d+)'
220
+
221
+ # Polaris/d.d is above
222
+ - regex: '(POLARIS)/(\d+)\.(\d+)'
223
+ family_replacement: 'Polaris'
224
+ - regex: '(Embider)/(\d+)\.(\d+)'
225
+ family_replacement: 'Polaris'
226
+
227
+ - regex: '(BonEcho)/(\d+)\.(\d+)\.(\d+)'
228
+ family_replacement: 'Bon Echo'
229
+
230
+ - regex: '(iPod).+Version/(\d+)\.(\d+)\.(\d+)'
231
+ family_replacement: 'Mobile Safari'
232
+ - regex: '(iPod).*Version/(\d+)\.(\d+)'
233
+ family_replacement: 'Mobile Safari'
234
+ - regex: '(iPhone).*Version/(\d+)\.(\d+)\.(\d+)'
235
+ family_replacement: 'Mobile Safari'
236
+ - regex: '(iPhone).*Version/(\d+)\.(\d+)'
237
+ family_replacement: 'Mobile Safari'
238
+ - regex: '(iPad).*Version/(\d+)\.(\d+)\.(\d+)'
239
+ family_replacement: 'Mobile Safari'
240
+ - regex: '(iPad).*Version/(\d+)\.(\d+)'
241
+ family_replacement: 'Mobile Safari'
242
+ - regex: '(iPod|iPhone|iPad);.*CPU.*OS (\d+)(?:_\d+)?_(\d+).*Mobile'
243
+ family_replacement: 'Mobile Safari'
244
+ - regex: '(iPod|iPhone|iPad)'
245
+ family_replacement: 'Mobile Safari'
246
+
247
+ - regex: '(AvantGo) (\d+).(\d+)'
248
+
249
+ - regex: '(Avant)'
250
+ v1_replacement: '1'
251
+
252
+ # nokia browsers
253
+ # based on: http://www.developer.nokia.com/Community/Wiki/User-Agent_headers_for_Nokia_devices
254
+ - regex: '^(Nokia)'
255
+ family_replacement: 'Nokia Services (WAP) Browser'
256
+ - regex: '(NokiaBrowser)/(\d+)\.(\d+).(\d+)\.(\d+)'
257
+ - regex: '(NokiaBrowser)/(\d+)\.(\d+).(\d+)'
258
+ - regex: '(NokiaBrowser)/(\d+)\.(\d+)'
259
+ - regex: '(BrowserNG)/(\d+)\.(\d+).(\d+)'
260
+ family_replacement: 'NokiaBrowser'
261
+ - regex: '(Series60)/5\.0'
262
+ family_replacement: 'NokiaBrowser'
263
+ v1_replacement: '7'
264
+ v2_replacement: '0'
265
+ - regex: '(Series60)/(\d+)\.(\d+)'
266
+ family_replacement: 'Nokia OSS Browser'
267
+ - regex: '(S40OviBrowser)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
268
+ family_replacement: 'Nokia Series 40 Ovi Browser'
269
+ - regex: '(Nokia)[EN]?(\d+)'
270
+
271
+ # BlackBerry devices
272
+ - regex: '(PlayBook).+RIM Tablet OS (\d+)\.(\d+)\.(\d+)'
273
+ family_replacement: 'Blackberry WebKit'
274
+ - regex: '(Black[bB]erry).+Version/(\d+)\.(\d+)\.(\d+)'
275
+ family_replacement: 'Blackberry WebKit'
276
+ - regex: '(Black[bB]erry)\s?(\d+)'
277
+ family_replacement: 'Blackberry'
278
+
279
+ - regex: '(OmniWeb)/v(\d+)\.(\d+)'
280
+
281
+ - regex: '(Blazer)/(\d+)\.(\d+)'
282
+ family_replacement: 'Palm Blazer'
283
+
284
+ - regex: '(Pre)/(\d+)\.(\d+)'
285
+ family_replacement: 'Palm Pre'
286
+
287
+ - regex: '(Links) \((\d+)\.(\d+)'
288
+
289
+ - regex: '(QtWeb) Internet Browser/(\d+)\.(\d+)'
290
+
291
+ #- regex: '\(iPad;.+(Version)/(\d+)\.(\d+)(?:\.(\d+))?.*Safari/'
292
+ # family_replacement: 'iPad'
293
+
294
+ # Amazon Silk, should go before Safari
295
+ - regex: '(Silk)/(\d+)\.(\d+)(?:\.([0-9\-]+))?'
296
+
297
+ # WebKit Nightly
298
+ - regex: '(AppleWebKit)/(\d+)\.?(\d+)?\+ .* Safari'
299
+ family_replacement: 'WebKit Nightly'
300
+
301
+ # Safari
302
+ - regex: '(Version)/(\d+)\.(\d+)(?:\.(\d+))?.*Safari/'
303
+ family_replacement: 'Safari'
304
+ # Safari didn't provide "Version/d.d.d" prior to 3.0
305
+ - regex: '(Safari)/\d+'
306
+
307
+ - regex: '(OLPC)/Update(\d+)\.(\d+)'
308
+
309
+ - regex: '(OLPC)/Update()\.(\d+)'
310
+ v1_replacement: '0'
311
+
312
+ - regex: '(SEMC\-Browser)/(\d+)\.(\d+)'
313
+
314
+ - regex: '(Teleca)'
315
+ family_replacement: 'Teleca Browser'
316
+
317
+ - regex: '(MSIE) (\d+)\.(\d+)'
318
+ family_replacement: 'IE'
319
+
320
+ - regex: '(Nintendo 3DS).* Version/(\d+)\.(\d+)(?:\.(\w+))'
321
+
322
+ os_parsers:
323
+
324
+ ##########
325
+ # Android
326
+ # can actually detect rooted android os. do we care?
327
+ ##########
328
+ - regex: '(Android) (\d+)\.(\d+)(?:[.\-]([a-z0-9]+))?'
329
+ - regex: '(Android)\-(\d+)\.(\d+)(?:[.\-]([a-z0-9]+))?'
330
+
331
+ - regex: '(Android) Donut'
332
+ os_v1_replacement: '1'
333
+ os_v2_replacement: '2'
334
+
335
+ - regex: '(Android) Eclair'
336
+ os_v1_replacement: '2'
337
+ os_v2_replacement: '1'
338
+
339
+ - regex: '(Android) Froyo'
340
+ os_v1_replacement: '2'
341
+ os_v2_replacement: '2'
342
+
343
+ - regex: '(Android) Gingerbread'
344
+ os_v1_replacement: '2'
345
+ os_v2_replacement: '3'
346
+
347
+ - regex: '(Android) Honeycomb'
348
+ os_v1_replacement: '3'
349
+
350
+ ##########
351
+ # Windows
352
+ # http://en.wikipedia.org/wiki/Windows_NT#Releases
353
+ # possibility of false positive when different marketing names share same NT kernel
354
+ # e.g. windows server 2003 and windows xp
355
+ # lots of ua strings have Windows NT 4.1 !?!?!?!? !?!? !? !????!?! !!! ??? !?!?! ?
356
+ # (very) roughly ordered in terms of frequency of occurence of regex (win xp currently most frequent, etc)
357
+ ##########
358
+ - regex: '(Windows Phone 6\.5)'
359
+
360
+ - regex: '(Windows (?:NT 5\.2|NT 5\.1))'
361
+ os_replacement: 'Windows XP'
362
+
363
+ # ie mobile des ktop mode
364
+ # spoofs nt 6.1. must come before windows 7
365
+ - regex: '(XBLWP7)'
366
+ os_replacement: 'Windows Phone OS'
367
+
368
+ - regex: '(Windows NT 6\.1)'
369
+ os_replacement: 'Windows 7'
370
+
371
+ - regex: '(Windows NT 6\.0)'
372
+ os_replacement: 'Windows Vista'
373
+
374
+ - regex: '(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\.0|Windows Vista|Windows 2000)'
375
+
376
+ # is this a spoof or is nt 6.2 out and about in some capacity?
377
+ - regex: '(Windows NT 6\.2)'
378
+ os_replacement: 'Windows 8'
379
+
380
+ - regex: '(Windows NT 5\.0)'
381
+ os_replacement: 'Windows 2000'
382
+
383
+ - regex: '(Windows Phone OS) (\d+)\.(\d+)'
384
+
385
+ - regex: '(Windows ?Mobile)'
386
+ os_replacement: 'Windows Mobile'
387
+
388
+ - regex: '(WinNT4.0)'
389
+ os_replacement: 'Windows NT 4.0'
390
+
391
+ - regex: '(Win98)'
392
+ os_replacement: 'Windows 98'
393
+
394
+ ##########
395
+ # Tizen OS from Samsung
396
+ # spoofs Android so pushing it above
397
+ ##########
398
+ - regex: '(Tizen)/(\d+)\.(\d+)'
399
+
400
+
401
+
402
+ ##########
403
+ # Mac OS
404
+ # http://en.wikipedia.org/wiki/Mac_OS_X#Versions
405
+ ##########
406
+ - regex: '(Mac OS X) (\d+)[_.](\d+)(?:[_.](\d+))?'
407
+
408
+ # builds before tiger don't seem to specify version?
409
+
410
+ # ios devices spoof (mac os x), so including intel/ppc prefixes
411
+ - regex: '(?:PPC|Intel) (Mac OS X)'
412
+
413
+ ##########
414
+ # iOS
415
+ # http://en.wikipedia.org/wiki/IOS_version_history
416
+ ##########
417
+ - regex: '(CPU OS|iPhone OS) (\d+)_(\d+)(?:_(\d+))?'
418
+ os_replacement: 'iOS'
419
+
420
+ # remaining cases are mostly only opera uas, so catch opera as to not catch iphone spoofs
421
+ - regex: '(iPhone|iPad|iPod); Opera'
422
+ os_replacement: 'iOS'
423
+
424
+ # few more stragglers
425
+ - regex: '(iPhone|iPad|iPod).*Mac OS X.*Version/(\d+)\.(\d+)'
426
+ os_replacement: 'iOS'
427
+
428
+ ##########
429
+ # Chrome OS
430
+ # if version 0.0.0, probably this stuff:
431
+ # http://code.google.com/p/chromium-os/issues/detail?id=11573
432
+ # http://code.google.com/p/chromium-os/issues/detail?id=13790
433
+ ##########
434
+ - regex: '(CrOS) [a-z0-9_]+ (\d+)\.(\d+)(?:\.(\d+))?'
435
+ os_replacement: 'Chrome OS'
436
+
437
+ ##########
438
+ # Linux distros
439
+ ##########
440
+ - regex: '(Debian)-(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?'
441
+ - regex: '(Linux Mint)(?:/(\d+))?'
442
+ - regex: '(Mandriva)(?: Linux)?/(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?'
443
+
444
+ ##########
445
+ # Symbian + Symbian OS
446
+ # http://en.wikipedia.org/wiki/History_of_Symbian
447
+ ##########
448
+ - regex: '(Symbian[Oo][Ss])/(\d+)\.(\d+)'
449
+ os_replacement: 'Symbian OS'
450
+ - regex: '(Symbian/3).+NokiaBrowser/7\.3'
451
+ os_replacement: 'Symbian^3 Anna'
452
+ - regex: '(Symbian/3).+NokiaBrowser/7\.4'
453
+ os_replacement: 'Symbian^3 Belle'
454
+ - regex: '(Symbian/3)'
455
+ os_replacement: 'Symbian^3'
456
+ - regex: '(Series 60|SymbOS|S60)'
457
+ os_replacement: 'Symbian OS'
458
+ - regex: '(MeeGo)'
459
+ - regex: 'Symbian [Oo][Ss]'
460
+ os_replacement: 'Symbian OS'
461
+
462
+ ##########
463
+ # BlackBerry devices
464
+ ##########
465
+ - regex: '(Black[Bb]erry)[0-9a-z]+/(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?'
466
+ os_replacement: 'BlackBerry OS'
467
+ - regex: '(Black[Bb]erry).+Version/(\d+)\.(\d+)\.(\d+)(?:\.(\d+))?'
468
+ os_replacement: 'BlackBerry OS'
469
+ - regex: '(RIM Tablet OS) (\d+)\.(\d+)\.(\d+)'
470
+ os_replacement: 'BlackBerry Tablet OS'
471
+ - regex: '(Play[Bb]ook)'
472
+ os_replacement: 'BlackBerry Tablet OS'
473
+ - regex: '(Black[Bb]erry)'
474
+ os_replacement: 'Blackberry OS'
475
+
476
+ ##########
477
+ # Misc mobile
478
+ ##########
479
+ - regex: '(webOS|hpwOS)/(\d+)\.(\d+)(?:\.(\d+))?'
480
+ os_replacement: 'webOS'
481
+
482
+ ##########
483
+ # Generic patterns
484
+ # since the majority of os cases are very specific, these go last
485
+ ##########
486
+ # first.second.third.fourth bits
487
+ - regex: '(SUSE|Fedora|Red Hat|PCLinuxOS)/(\d+)\.(\d+)\.(\d+)\.(\d+)'
488
+
489
+ # first.second.third bits
490
+ - regex: '(SUSE|Fedora|Red Hat|Puppy|PCLinuxOS|CentOS)/(\d+)\.(\d+)\.(\d+)'
491
+
492
+ # first.second bits
493
+ - regex: '(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\d+)\.(\d+)'
494
+ - regex: '(PlayStation Vita) (\d+)\.(\d+)'
495
+
496
+ # just os
497
+ - regex: '(Windows|OpenBSD|FreeBSD|NetBSD|Ubuntu|Kubuntu|Android|Arch Linux|CentOS|WeTab|Slackware)'
498
+ - regex: '(Linux|BSD)'
499
+
500
+ device_parsers:
501
+ ##########
502
+ # incomplete!
503
+ # multiple replacement placeholds i.e. ($1) ($2) help solve problem of single device with multiple representations in ua
504
+ # e.g. HTC Dream S should parse to the same device as HTC_DreamS
505
+ ##########
506
+
507
+ ##########
508
+ # incomplete!
509
+ # HTC
510
+ # http://en.wikipedia.org/wiki/List_of_HTC_phones
511
+ # this is quickly getting unwieldy
512
+ ##########
513
+ # example: Mozilla/5.0 (Linux; U; Android 2.3.2; fr-fr; HTC HD2 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
514
+ - regex: 'HTC ([A-Z][a-z0-9]+) Build'
515
+ device_replacement: 'HTC $1'
516
+ # example: Mozilla/5.0 (Linux; U; Android 2.1; es-es; HTC Legend 1.23.161.1 Build/ERD79) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17,gzip
517
+ - regex: 'HTC ([A-Z][a-z0-9 ]+) \d+\.\d+\.\d+\.\d+'
518
+ device_replacement: 'HTC $1'
519
+ # example: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HTC_Touch_Diamond2_T5353; Windows Phone 6.5.3.5)
520
+ - regex: 'HTC_Touch_([A-Za-z0-9]+)'
521
+ device_replacement: 'HTC Touch ($1)'
522
+ # should come after HTC_Touch
523
+ - regex: 'USCCHTC(\d+)'
524
+ device_replacement: 'HTC $1 (US Cellular)'
525
+ - regex: 'Sprint APA(9292)'
526
+ device_replacement: 'HTC $1 (Sprint)'
527
+ - regex: 'HTC ([A-Za-z0-9]+ [A-Z])'
528
+ device_replacement: 'HTC $1'
529
+ - regex: 'HTC-([A-Za-z0-9]+)'
530
+ device_replacement: 'HTC $1'
531
+ - regex: 'HTC_([A-Za-z0-9]+)'
532
+ device_replacement: 'HTC $1'
533
+ - regex: 'HTC ([A-Za-z0-9]+)'
534
+ device_replacement: 'HTC $1'
535
+ - regex: '(ADR[A-Za-z0-9]+)'
536
+ device_replacement: 'HTC $1'
537
+ - regex: '(HTC)'
538
+
539
+ # Samsung
540
+ - regex: '(SamsungSGHi560)'
541
+ device_replacement: 'Samsung SGHi560'
542
+
543
+ #########
544
+ # Ericsson - must come before nokia since they also use symbian
545
+ #########
546
+ - regex: 'SonyEricsson([A-Za-z0-9]+)/'
547
+ device_replacement: 'Ericsson $1'
548
+
549
+ #########
550
+ # Android General Device Matching (far from perfect)
551
+ #########
552
+ - regex: 'Android[\- ][\d]+\.[\d]+\; [A-Za-z]{2}\-[A-Za-z]{2}\; WOWMobile (.+) Build'
553
+ - regex: 'Android[\- ][\d]+\.[\d]+\.[\d]+; [A-Za-z]{2}\-[A-Za-z]{2}\; (.+) Build'
554
+ - regex: 'Android[\- ][\d]+\.[\d]+\-update1\; [A-Za-z]{2}\-[A-Za-z]{2}\; (.+) Build'
555
+ - regex: 'Android[\- ][\d]+\.[\d]+\; [A-Za-z]{2}\-[A-Za-z]{2}\; (.+) Build'
556
+ - regex: 'Android[\- ][\d]+\.[\d]+\.[\d]+; (.+) Build'
557
+
558
+ ##########
559
+ # NOKIA
560
+ # nokia NokiaN8-00 comes before iphone. sometimes spoofs iphone
561
+ ##########
562
+ - regex: 'NokiaN([0-9]+)'
563
+ device_replacement: 'Nokia N$1'
564
+ - regex: 'Nokia([A-Za-z0-9\v-]+)'
565
+ device_replacement: 'Nokia $1'
566
+ - regex: 'NOKIA ([A-Za-z0-9\-]+)'
567
+ device_replacement: 'Nokia $1'
568
+ - regex: 'Nokia ([A-Za-z0-9\-]+)'
569
+ device_replacement: 'Nokia $1'
570
+ - regex: 'Lumia ([A-Za-z0-9\-]+)'
571
+ device_replacement: 'Lumia $1'
572
+ - regex: 'Symbian'
573
+ device_replacement: 'Nokia'
574
+
575
+ ##########
576
+ # Blackberry
577
+ # http://www.useragentstring.com/pages/BlackBerry/
578
+ ##########
579
+ - regex: '(PlayBook).+RIM Tablet OS'
580
+ device_replacement: 'Blackberry Playbook'
581
+ - regex: '(Black[Bb]erry [0-9]+);'
582
+ - regex: 'Black[Bb]erry([0-9]+)'
583
+ device_replacement: 'BlackBerry $1'
584
+
585
+ ##########
586
+ # PALM / HP
587
+ ##########
588
+ # some palm devices must come before iphone. sometimes spoofs iphone in ua
589
+ - regex: '(Pre)/(\d+)\.(\d+)'
590
+ device_replacement: 'Palm Pre'
591
+ - regex: '(Pixi)/(\d+)\.(\d+)'
592
+ device_replacement: 'Palm Pixi'
593
+ - regex: '(Touchpad)/(\d+)\.(\d+)'
594
+ device_replacement: 'HP Touchpad'
595
+ - regex: 'HPiPAQ([A-Za-z0-9]+)/(\d+).(\d+)'
596
+ device_replacement: 'HP iPAQ $1'
597
+ - regex: 'Palm([A-Za-z0-9]+)'
598
+ device_replacement: 'Palm $1'
599
+ - regex: 'Treo([A-Za-z0-9]+)'
600
+ device_replacement: 'Palm Treo $1'
601
+ - regex: 'webOS.*(P160UNA)/(\d+).(\d+)'
602
+ device_replacement: 'HP Veer'
603
+
604
+ ##########
605
+ # incomplete!
606
+ # Kindle
607
+ ##########
608
+ - regex: '(Kindle Fire)'
609
+ - regex: '(Kindle)'
610
+ - regex: '(Silk)/(\d+)\.(\d+)(?:\.([0-9\-]+))?'
611
+ device_replacement: 'Kindle Fire'
612
+
613
+ ##########
614
+ # complete but probably catches spoofs
615
+ # iSTUFF
616
+ ##########
617
+ # ipad and ipod must be parsed before iphone
618
+ # cannot determine specific device type from ua string. (3g, 3gs, 4, etc)
619
+ - regex: '(iPad) Simulator;'
620
+ - regex: '(iPad);'
621
+ - regex: '(iPod);'
622
+ - regex: '(iPhone) Simulator;'
623
+ - regex: '(iPhone);'
624
+
625
+ ##########
626
+ # Acer
627
+ ##########
628
+ - regex: 'acer_([A-Za-z0-9]+)_'
629
+ device_replacement: 'Acer $1'
630
+ - regex: 'acer_([A-Za-z0-9]+)_'
631
+ device_replacement: 'Acer $1'
632
+
633
+ ##########
634
+ # Amoi
635
+ ##########
636
+ - regex: 'Amoi\-([A-Za-z0-9]+)'
637
+ device_replacement: 'Amoi $1'
638
+ - regex: 'AMOI\-([A-Za-z0-9]+)'
639
+ device_replacement: 'Amoi $1'
640
+
641
+ ##########
642
+ # Amoi
643
+ ##########
644
+ - regex: 'Asus\-([A-Za-z0-9]+)'
645
+ device_replacement: 'Asus $1'
646
+ - regex: 'ASUS\-([A-Za-z0-9]+)'
647
+ device_replacement: 'Asus $1'
648
+
649
+ ##########
650
+ # Bird
651
+ ##########
652
+ - regex: 'BIRD\-([A-Za-z0-9]+)'
653
+ device_replacement: 'Bird $1'
654
+ - regex: 'BIRD\.([A-Za-z0-9]+)'
655
+ device_replacement: 'Bird $1'
656
+ - regex: 'BIRD ([A-Za-z0-9]+)'
657
+ device_replacement: 'Bird $1'
658
+
659
+ ##########
660
+ # Dell
661
+ ##########
662
+ - regex: 'Dell ([A-Za-z0-9]+)'
663
+ device_replacement: 'Dell $1'
664
+
665
+ ##########
666
+ # DoCoMo
667
+ ##########
668
+ - regex: 'DoCoMo/2\.0 ([A-Za-z0-9]+)'
669
+ device_replacement: 'DoCoMo $1'
670
+ - regex: '([A-Za-z0-9]+)\_W\;FOMA'
671
+ device_replacement: 'DoCoMo $1'
672
+ - regex: '([A-Za-z0-9]+)\;FOMA'
673
+ device_replacement: 'DoCoMo $1'
674
+
675
+ ##########
676
+ # Huawei Vodafone
677
+ ##########
678
+ - regex: 'vodafone([A-Za-z0-9]+)'
679
+ device_replacement: 'Huawei Vodafone $1'
680
+
681
+ ##########
682
+ # i-mate
683
+ ##########
684
+ - regex: 'i\-mate ([A-Za-z0-9]+)'
685
+ device_replacement: 'i-mate $1'
686
+
687
+ ##########
688
+ # kyocera
689
+ ##########
690
+ - regex: 'Kyocera\-([A-Za-z0-9]+)'
691
+ device_replacement: 'Kyocera $1'
692
+ - regex: 'KWC\-([A-Za-z0-9]+)'
693
+ device_replacement: 'Kyocera $1'
694
+
695
+ ##########
696
+ # lenovo
697
+ ##########
698
+ - regex: 'Lenovo\-([A-Za-z0-9]+)'
699
+ device_replacement: 'Lenovo $1'
700
+ - regex: 'Lenovo\_([A-Za-z0-9]+)'
701
+ device_replacement: 'Lenovo $1'
702
+
703
+ ##########
704
+ # lg
705
+ ##########
706
+ - regex: 'LG/([A-Za-z0-9]+)'
707
+ device_replacement: 'LG $1'
708
+ - regex: 'LG-LG([A-Za-z0-9]+)'
709
+ device_replacement: 'LG $1'
710
+ - regex: 'LGE-LG([A-Za-z0-9]+)'
711
+ device_replacement: 'LG $1'
712
+ - regex: 'LGE VX([A-Za-z0-9]+)'
713
+ device_replacement: 'LG $1'
714
+ - regex: 'LG ([A-Za-z0-9]+)'
715
+ device_replacement: 'LG $1'
716
+ - regex: 'LGE LG\-AX([A-Za-z0-9]+)'
717
+ device_replacement: 'LG $1'
718
+ - regex: 'LG\-([A-Za-z0-9]+)'
719
+ device_replacement: 'LG $1'
720
+ - regex: 'LGE\-([A-Za-z0-9]+)'
721
+ device_replacement: 'LG $1'
722
+ - regex: 'LG([A-Za-z0-9]+)'
723
+ device_replacement: 'LG $1'
724
+
725
+ ##########
726
+ # kin
727
+ ##########
728
+ - regex: '(KIN)\.One (\d+)\.(\d+)'
729
+ device_replacement: 'Microsoft $1'
730
+ - regex: '(KIN)\.Two (\d+)\.(\d+)'
731
+ device_replacement: 'Microsoft $1'
732
+
733
+ ##########
734
+ # motorola
735
+ ##########
736
+ - regex: '(Motorola)\-([A-Za-z0-9]+)'
737
+ - regex: 'MOTO\-([A-Za-z0-9]+)'
738
+ device_replacement: 'Motorola $1'
739
+ - regex: 'MOT\-([A-Za-z0-9]+)'
740
+ device_replacement: 'Motorola $1'
741
+
742
+ ##########
743
+ # philips
744
+ ##########
745
+ - regex: 'Philips([A-Za-z0-9]+)'
746
+ device_replacement: 'Philips $1'
747
+ - regex: 'Philips ([A-Za-z0-9]+)'
748
+ device_replacement: 'Philips $1'
749
+
750
+ ##########
751
+ # Samsung
752
+ ##########
753
+ - regex: 'SAMSUNG-([A-Za-z0-9\-]+)'
754
+ device_replacement: 'Samsung $1'
755
+ - regex: 'SAMSUNG\; ([A-Za-z0-9\-]+)'
756
+ device_replacement: 'Samsung $1'
757
+
758
+ ##########
759
+ # Softbank
760
+ ##########
761
+ - regex: 'Softbank/1\.0/([A-Za-z0-9]+)'
762
+ device_replacement: 'Softbank $1'
763
+ - regex: 'Softbank/2\.0/([A-Za-z0-9]+)'
764
+ device_replacement: 'Softbank $1'
765
+
766
+ ##########
767
+ # Generic Smart Phone
768
+ ##########
769
+ - regex: '(hiptop|avantgo|plucker|xiino|blazer|elaine|up.browser|up.link|mmp|smartphone|midp|wap|vodafone|o2|pocket|mobile|pda)'
770
+ device_replacement: "Generic Smartphone"
771
+
772
+ ##########
773
+ # Generic Feature Phone
774
+ ##########
775
+ - regex: '^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\-|airn|alav|asus|attw|au\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\-n|bw\-u|beck|benq|bilb|blac|c55/|cdm\-|chtm|capi|comp|cond|craw|dall|dbte|dc\-s|dica|ds\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\-|fly\_|g\-mo|g1 u|g560|gf\-5|grun|gene|go.w|good|grad|hcit|hd\-m|hd\-p|hd\-t|hei\-|hp i|hpip|hs\-c|htc |htc\-|htca|htcg)'
776
+ device_replacement: 'Generic Feature Phone'
777
+ - regex: '^(htcp|htcs|htct|htc\_|haie|hita|huaw|hutc|i\-20|i\-go|i\-ma|i230|iac|iac\-|iac/|ig01|im1k|inno|iris|jata|java|kddi|kgt|kgt/|kpt |kwc\-|klon|lexi|lg g|lg\-a|lg\-b|lg\-c|lg\-d|lg\-f|lg\-g|lg\-k|lg\-l|lg\-m|lg\-o|lg\-p|lg\-s|lg\-t|lg\-u|lg\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\-|lge/|lynx|leno|m1\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot |mot\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\-|nem\-|newg|neon)'
778
+ device_replacement: 'Generic Feature Phone'
779
+ - regex: '^(netf|noki|nzph|o2 x|o2\-x|opwv|owg1|opti|oran|ot\-s|p800|pand|pg\-1|pg\-2|pg\-3|pg\-6|pg\-8|pg\-c|pg13|phil|pn\-2|pt\-g|palm|pana|pire|pock|pose|psio|qa\-a|qc\-2|qc\-3|qc\-5|qc\-7|qc07|qc12|qc21|qc32|qc60|qci\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\-|scp\-|sdk/|se47|sec\-|sec0|sec1|semc|sgh\-|shar|sie\-|sk\-0|sl45|slid|smb3|smt5|sp01|sph\-|spv |spv\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\-mo|t218|t250|t600|t610|t618|tcl\-|tdg\-|telm|tim\-|ts70|tsm\-|tsm3|tsm5|tx\-9|tagt)'
780
+ device_replacement: 'Generic Feature Phone'
781
+ - regex: '^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c |w3c\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\-|your|zte\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\-|webc|whit|wmlb|xda\-|xda\_)'
782
+ device_replacement: 'Generic Feature Phone'
783
+
784
+ ##########
785
+ # Spiders (this is hack...)
786
+ ##########
787
+ - regex: '(bot|borg|google(^tv)|yahoo|slurp|msnbot|msrbot|openbot|archiver|netresearch|lycos|scooter|altavista|teoma|gigabot|baiduspider|blitzbot|oegp|charlotte|furlbot|http%20client|polybot|htdig|ichiro|mogimogi|larbin|pompos|scrubby|searchsight|seekbot|semanticdiscovery|silk|snappy|speedy|spider|voila|vortex|voyager|zao|zeal|fast\-webcrawler|converacrawler|dataparksearch|findlinks)'
788
+ device_replacement: 'Spider'
789
+
790
+
791
+ mobile_user_agent_families:
792
+ - 'Firefox Mobile'
793
+ - 'Opera Mobile'
794
+ - 'Opera Mini'
795
+ - 'Mobile Safari'
796
+ - 'webOS'
797
+ - 'IE Mobile'
798
+ - 'Playstation Portable'
799
+ - 'Nokia'
800
+ - 'Blackberry'
801
+ - 'Palm'
802
+ - 'Silk'
803
+ - 'Android'
804
+ - 'Maemo'
805
+ - 'Obigo'
806
+ - 'Netfront'
807
+ - 'AvantGo'
808
+ - 'Teleca'
809
+ - 'SEMC-Browser'
810
+ - 'Bolt'
811
+ - 'Iris'
812
+ - 'UP.Browser'
813
+ - 'Symphony'
814
+ - 'Minimo'
815
+ - 'Bunjaloo'
816
+ - 'Jasmine'
817
+ - 'Dolfin'
818
+ - 'Polaris'
819
+ - 'BREW'
820
+ - 'Chrome Mobile'
821
+ - 'UC Browser'
822
+ - 'Tizen Browser'
823
+
824
+ # Some select mobile OSs report a desktop browser.
825
+ # make sure we note they're mobile
826
+ mobile_os_families:
827
+ - 'Windows Phone 6.5'
828
+ - 'Windows CE'
829
+ - 'Symbian OS'