Skip to content

Commit 8a669e3

Browse files
authored
fix issue due to ua-parser-0.9.0 change (#100)
1 parent 70e014a commit 8a669e3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

user_agents/devices.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@
297297
},
298298
"windows_ce": {
299299
"is_bot": false,
300-
"is_mobile": false,
300+
"is_mobile": true,
301301
"is_pc": false,
302302
"is_tablet": false,
303-
"is_touch_capable": false,
303+
"is_touch_capable": true,
304304
"ua_string": "SAMSUNG-SGH-I617/UCHJ1 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)",
305305
"str": "Samsung SGH-I617 / Windows CE / IE Mobile 7.11"
306306
},

user_agents/parsers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
)
3131

3232
MOBILE_BROWSER_FAMILIES = (
33+
'IE Mobile',
3334
'Opera Mobile',
3435
'Opera Mini',
3536
)
@@ -215,7 +216,7 @@ def is_touch_capable(self):
215216
if self.device.family in TOUCH_CAPABLE_DEVICE_FAMILIES:
216217
return True
217218
if self.os.family == 'Windows':
218-
if self.os.version_string.startswith('RT'):
219+
if self.os.version_string.startswith(('RT', 'CE')):
219220
return True
220221
if self.os.version_string.startswith('8') and 'Touch' in self.ua_string:
221222
return True

0 commit comments

Comments
 (0)