python-user-agents icon indicating copy to clipboard operation
python-user-agents copied to clipboard

GooglePlusBot is not identified as a bot

Open sangaline opened this issue 1 year ago • 2 comments

GooglePlusBot was originally used to generate link previews on Google Plus, but is now used for other use-cases like generating previews for links in SMS messages on Android (see fnando/browser#515 for additional context). The library doesn't tag this as a bot despite it being one.

Here's an example of the user agent processing:

from user_agents import parse

ua_string = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Google-PageRenderer Google (+https://developers.google.com/+/web/snippet/)'
user_agent = parse(ua_string)
print('Browser?', user_agent.get_browser())
print('Is Bot?', user_agent.is_bot)
Browser? GooglePlusBot
Is Bot? False

sangaline avatar Feb 28 '23 17:02 sangaline

This seems like a special case of #35, there isn't really much logic around the bot detection.

sangaline avatar Feb 28 '23 19:02 sangaline

The logic is in uap-core. Shouldn't the problem be reported there?

PetrDlouhy avatar Jul 17 '23 14:07 PetrDlouhy