rhiever / TwitterFollowBot

A Python bot that automates several actions on Twitter, such as following users and favoriting tweets.
GNU General Public License v3.0
1.31k stars 447 forks source link

How to run? #110

Open Kuppey opened 8 years ago

Kuppey commented 8 years ago

hi! i'm new to github and also new in python. already installed everything and i dont know how to run it. I appreciate your help ^_^

iandouglas commented 8 years ago

You'd need to create your own Python script which uses this library, then run that script.

For example, once you have the configs built, make a script that has something like this:

from TwitterFollowBot import TwitterBot
my_bot.sync_follows()

Save that as 'yourscript.py' and then run it at your prompt like:

$ python yourscript.py
PhillRob commented 7 years ago

I like to eternally loop through multiple keywords:

from TwitterFollowBot import TwitterBot
keyword = ["keyword 1","keyword 2","keyword three"]
tweetssearched = 50
my_bot = TwitterBot("/to/your/folder/TwitterFollowBot/config-yours.txt")
while True:
        my_bot.sync_follows()
        for word in keyword:
                print ("This is RT'ing and fav'ing the keyword '%s' scanning the latest  %i tweets. We are snobbing our followers by not systematically following them back!" % (word,tweetssearched))
                my_bot.auto_fav(word,count=tweetssearched)
                my_bot.auto_rt(word,count=tweetssearched)