File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Original file line number Diff line number Diff line change 148
148
"is_mobile" : true ,
149
149
"is_pc" : false ,
150
150
"is_tablet" : false ,
151
- "is_touch_capable" : false ,
151
+ "is_touch_capable" : true ,
152
152
"ua_string" : " Mozilla/5.0 (MeeGo; NokiaN9) AppleWebKit/534.13 (KHTML, like Gecko) NokiaBrowser/8.5.0 Mobile Safari/534.13" ,
153
153
"str" : " Nokia N9 / MeeGo / Nokia Browser 8.5.0"
154
154
},
161
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" ,
162
162
"str" : " Nokia N97 / Symbian OS 9.4 / Nokia Browser 7.1.12344"
163
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
+ },
164
173
"playbook" : {
165
174
"is_bot" : false ,
166
175
"is_mobile" : false ,
Original file line number Diff line number Diff line change 18
18
'iPod' ,
19
19
'Generic Smartphone' ,
20
20
'Generic Feature Phone' ,
21
- 'Nokia N9' ,
22
21
'PlayStation Vita' ,
23
22
)
24
23
36
35
'Bada' ,
37
36
'Windows CE' ,
38
37
'Windows Mobile' ,
38
+ 'Maemo' ,
39
39
)
40
40
41
41
MOBILE_BROWSER_FAMILIES = (
64
64
'Windows CE' ,
65
65
'Windows Mobile' ,
66
66
'Firefox OS' ,
67
+ 'MeeGo' ,
67
68
)
68
69
69
70
TOUCH_CAPABLE_DEVICE_FAMILIES = (
@@ -195,6 +196,9 @@ def is_mobile(self):
195
196
# Mobile Spiders should be identified as mobile
196
197
if self .device .family == 'Spider' and 'Mobile' in self .browser .family :
197
198
return True
199
+ # Nokia mobile
200
+ if 'NokiaBrowser' in self .ua_string and 'Mobile' in self .ua_string :
201
+ return True
198
202
return False
199
203
200
204
@property
@@ -218,6 +222,9 @@ def is_pc(self):
218
222
# TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
219
223
if self .os .family == 'Mac OS X' and 'Silk' not in self .ua_string :
220
224
return True
225
+ # Maemo has 'Linux' and 'X11' in UA, but it is not for PC
226
+ if 'Maemo' in self .ua_string :
227
+ return False
221
228
if 'Linux' in self .ua_string and 'X11' in self .ua_string :
222
229
return True
223
230
return False
You can’t perform that action at this time.
0 commit comments