Skip to content
fabrimagic72 edited this page Oct 18, 2016 · 9 revisions

Welcome to the twitint wiki!

twitint is a twitter bot capable of several different features. twitint needs a twitter application because it access directly to the twitter api server, so please notice that you need to create your twitter application before using twitint. Once your twitter application is ready you must create your config file in the format below:

[access] access_token = <your access token here> access_token_secret = <your access token secret here> consumer_key = <your consumer key here> consumer_secret = <your consumer secret here>

twitint will basically search for hastags or keywords from public tweets and it will perform some additional actions configured via the options. Let's have a look at the options:

-h, --help Show help message and exit -v, --verbose Enable verbose output (higly recommended) -s , --string <string Specify a search string. It can be a hashtag or keyword. -r, --rate Print rate limit status (JSON) -c , --config Use configuration file. Specify full path -f, --follow Every time a tweet matching selected criteria is found, then automatically follow the originating user -b, --block Every time a tweet matching selected criteria is found, then automatically block the originating user -r, --report Every time a tweet matching selected criteria is found, then automatically report the originating user as spam -o , --output Save logs to log file. Specify full path -n, --notweet Do not save tweets on log file to prevent encoding issues -u, --userid Save only user ID on logfile, creating a direct link to user timeline

Examples:

python twitint.py -v -s "#twitint" -c ./config.txt -o ./logfile.txt

This command line will look for hastag #twitint on all public tweets and then save the output to logfile.txt

python twitint.py -v -s "#twitint" -c ./config.txt -o ./logfile.txt --notweet

This command line will look for hastag #twitint on all public tweets and then save the output to logfile.txt excluding the content of the tweet. Only information about user id and user screen name will be saved

python twitint.py -v -s "#twitint" -c ./config.txt -o ./logfile.txt --userid

This command line will look for hastag #twitint on all public tweets and then save a direct link to the user's timeline page using the userid format. This is very useful if you just have to create a list of users creating tweets with a certain hastag or keyword

Clone this wiki locally