Skip to content

Commit 1bbd4c0

Browse files
committed
Merge pull request selwin#26 from edricgarran/master
add support to googlebot-mobile user agent that wasn't handled before.
2 parents 9ad93b8 + 72b5f8e commit 1bbd4c0

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎user_agents/devices.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,15 @@
268268
"ua_string": "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)",
269269
"str": "Spider / Other / Mobile Safari"
270270
},
271+
"googlebot_mobile_3": {
272+
"is_bot": true,
273+
"is_mobile": true,
274+
"is_pc": false,
275+
"is_tablet": false,
276+
"is_touch_capable": false,
277+
"ua_string": "DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)",
278+
"str": "Spider / Other / Other"
279+
},
271280
"windows_ce": {
272281
"is_bot": false,
273282
"is_mobile": true,

‎user_agents/parsers.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def is_mobile(self):
191191
# This is here mainly to detect Google's Mobile Spider
192192
if 'iPhone;' in self.ua_string:
193193
return True
194+
if 'Googlebot-Mobile' in self.ua_string:
195+
return True
194196
# Mobile Spiders should be identified as mobile
195197
if self.device.family == 'Spider' and 'Mobile' in self.browser.family:
196198
return True

0 commit comments

Comments
 (0)