python-zulip-api/contrib_bots/bots/googlesearch
derAnfaenger c6d294385f bots: Refactor bots to use send_reply.
The send_reply function makes it easier for bots
to send messages. This commit updates all bots to
make use of this function, when possible.
2017-05-24 13:16:23 -07:00
..
googlesearch.py bots: Refactor bots to use send_reply. 2017-05-24 13:16:23 -07:00
readme.md bots: Fix googlesearch bot exceptions and add readme. 2017-05-23 20:18:24 -07:00

Google Search bot

This bot allows users to do Google search queries and have the bot respond with the first search result. It is by default set to the highest safe-search setting.

Usage

Run this bot as described here.

Use this bot with the following command

@mentioned-bot <search terms>

This will return the first link found by Google for <search terms> and print the resulting URL.

If no <search terms> are entered, a help message is printed instead.

If there was an error in the process of running the search (socket errors, Google search function failed, or general failures), an error message is returned.