Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A perl script that searches for a word on twitter and tweets it in a public timeline
Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README
bot.pl

README

== Twitter Searchbot ==

This bot is licenced under the GNU GPL Version 2 available here:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

This is a perl bot that uses DBI to connect to database and the perl Net::Twitter and Net::Twitter::Search cpan modules to search and tweet.
It was modified and released by Ben Bradshaw (http://twitter.com/serenecloud) from source provided by Brenda Wallace

This code comes with no Warranty, Support or anything else. If you spam twitter with searches and tweets with this and get your account suspended or banned, that's your problem, not mine.

How to:

1. Download/checkout the bot.pl file.
2. Create a database that the bot can write to and change bot.pl to have those config values
3. Create the repeated table in the database
    SQL syntax: create table searchbot_repeated( id integer UNIQUE NOT NULL);
4. Download and install the cpan modules
5. Register a Twitter account for the bot to use

6. Run the bot
/path/to/bot.pl botname password searchterm > /path/to/log

7. Add a crontab to execute every X minutes
*/5 * * * * /path/to/bot.pl botname password searchterm > /path/to/log

e.g. for #nzelection tweets:
*/5 * * * * /path/to/bot.pl botname password \#nzelection > /path/to/log

Credit + Thanks:
Brenda Wallace - http://coffee.geek.nz/
    * Wrote the original ShinyBot that this bot was made from 
    * Wrote Net::Twitter::Search and included a patch from me
    * Allowed me to release this code Open Source
Chris Thompson for writing Net::Twitter
Something went wrong with that request. Please try again.