Skip to content

Commit 72b5f8e

Browse files
author
Felipe Trzaskowski
committed
add support to googlebot-mobile user agent that wasn't handled before.
1 parent 38f06e8 commit 72b5f8e

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
@@ -187,6 +187,8 @@ def is_mobile(self):
187187
# This is here mainly to detect Google's Mobile Spider
188188
if 'iPhone;' in self.ua_string:
189189
return True
190+
if 'Googlebot-Mobile' in self.ua_string:
191+
return True
190192
# Mobile Spiders should be identified as mobile
191193
if self.device.family == 'Spider' and 'Mobile' in self.browser.family:
192194
return True

0 commit comments

Comments
 (0)