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 1bbd4c0

Browse filesBrowse 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
Copy full SHA for 1bbd4c0

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
@@ -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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.