File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Original file line number Diff line number Diff line change 143
143
"ua_string" : " Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19" ,
144
144
"str" : " Nexus 7 / Android 4.1.1 / Chrome 18.0.1025"
145
145
},
146
+ "nokia_n9" : {
147
+ "is_bot" : false ,
148
+ "is_mobile" : true ,
149
+ "is_pc" : false ,
150
+ "is_tablet" : false ,
151
+ "is_touch_capable" : true ,
152
+ "ua_string" : " Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13" ,
153
+ "str" : " Nokia N9 / MeeGo / Nokia Browser 8.5.0"
154
+ },
146
155
"nokia_n97" : {
147
156
"is_bot" : false ,
148
157
"is_mobile" : true ,
152
161
"ua_string" : " Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/12.0.024; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.12344" ,
153
162
"str" : " Nokia N97 / Symbian OS 9.4 / Nokia Browser 7.1.12344"
154
163
},
164
+ "nokia_n900" : {
165
+ "is_bot" : false ,
166
+ "is_mobile" : true ,
167
+ "is_pc" : false ,
168
+ "is_tablet" : false ,
169
+ "is_touch_capable" : false ,
170
+ "ua_string" : " Mozilla/5.0 (X11; U; Linux armv7l; no-NO; rv:1.9.2.3pre) Gecko/20100723 Firefox/3.5 Maemo Browser 1.7.4.8 RX-51 N900" ,
171
+ "str" : " Nokia N900 / Maemo / Maemo Browser 1.7.4"
172
+ },
155
173
"playbook" : {
156
174
"is_bot" : false ,
157
175
"is_mobile" : false ,
Original file line number Diff line number Diff line change 35
35
'Bada' ,
36
36
'Windows CE' ,
37
37
'Windows Mobile' ,
38
+ 'Maemo' ,
38
39
)
39
40
40
41
MOBILE_BROWSER_FAMILIES = (
63
64
'Windows CE' ,
64
65
'Windows Mobile' ,
65
66
'Firefox OS' ,
67
+ 'MeeGo' ,
66
68
)
67
69
68
70
TOUCH_CAPABLE_DEVICE_FAMILIES = (
@@ -196,6 +198,9 @@ def is_mobile(self):
196
198
# Mobile Spiders should be identified as mobile
197
199
if self .device .family == 'Spider' and 'Mobile' in self .browser .family :
198
200
return True
201
+ # Nokia mobile
202
+ if 'NokiaBrowser' in self .ua_string and 'Mobile' in self .ua_string :
203
+ return True
199
204
return False
200
205
201
206
@property
@@ -219,6 +224,9 @@ def is_pc(self):
219
224
# TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
220
225
if self .os .family == 'Mac OS X' and 'Silk' not in self .ua_string :
221
226
return True
227
+ # Maemo has 'Linux' and 'X11' in UA, but it is not for PC
228
+ if 'Maemo' in self .ua_string :
229
+ return False
222
230
if 'Linux' in self .ua_string and 'X11' in self .ua_string :
223
231
return True
224
232
return False
You can’t perform that action at this time.
0 commit comments