File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 303303 "is_touch_capable" : false ,
304304 "ua_string" : " Opera/9.80 (BREW; Opera Mini/5.0/27.2370; U; en) Presto/2.8.119 240X320 Samsung SCH-U380" ,
305305 "str" : " Opera / Android 2.3.3 / Opera Mobile 11.50"
306+ },
307+ "windows_95" : {
308+ "is_bot" : false ,
309+ "is_mobile" : false ,
310+ "is_pc" : true ,
311+ "is_tablet" : false ,
312+ "is_touch_capable" : false ,
313+ "ua_string" : " Mozilla/5.0 (Windows; U; Win 9x 4.90; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1" ,
314+ "str" : " Other / Windows ME / Firefox 2"
315+ },
316+ "solaris" : {
317+ "is_bot" : false ,
318+ "is_mobile" : false ,
319+ "is_pc" : true ,
320+ "is_tablet" : false ,
321+ "is_touch_capable" : false ,
322+ "ua_string" : " Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040503" ,
323+ "str" : " Other / Solaris / Other"
306324 }
307325}
308326
Original file line number Diff line number Diff line change 2121 'PlayStation Vita' ,
2222)
2323
24+ PC_OS_FAMILIES = (
25+ 'Windows 95' ,
26+ 'Windows 98' ,
27+ 'Windows ME' ,
28+ 'Solaris' ,
29+ )
30+
2431MOBILE_OS_FAMILIES = (
2532 'Windows Phone' ,
2633 'Windows Phone OS' , # Earlier versions of ua-parser returns Windows Phone OS
@@ -201,7 +208,7 @@ def is_touch_capable(self):
201208 @property
202209 def is_pc (self ):
203210 # Returns True for "PC" devices (Windows, Mac and Linux)
204- if 'Windows NT' in self .ua_string :
211+ if 'Windows NT' in self .ua_string or self . os . family in PC_OS_FAMILIES :
205212 return True
206213 # TODO: remove after https://github.com/tobie/ua-parser/issues/127 is closed
207214 if self .os .family == 'Mac OS X' and 'Silk' not in self .ua_string :
You can’t perform that action at this time.
0 commit comments