Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 72b5f8e

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

File tree

Expand file treeCollapse file tree

2 files changed

+11
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+11
-0
lines changed

‎user_agents/devices.json

Copy file name to clipboardExpand all lines: user_agents/devices.json
+9Lines 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

Copy file name to clipboardExpand all lines: user_agents/parsers.py
+2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.