Search code examples
pythontwitterbots

Is it possible to multiple phrases to this .py?


Bot.py ( the one I'm using)

#!/usr/bin/env python

from TwitterFollowBot import TwitterBot
my_bot = TwitterBot("/Home/TwitterFollowBot/config.txt")  
my_bot.sync_follows()
my_bot.auto_rt("@ShoutGamers", count=2200)

So bacially I'm using thisTwitterFollowBot bot to automatically retweet any tweet which has "@ShoutGamers" included in it.

Default .py

from TwitterFollowBot import TwitterBot
my_bot = TwitterBot()
my_bot.auto_fav("phrase", count=1000)

I would like to know how do I add multiple phrases in to this? I need to add these two phrases in to this @ShoutGamers and @RtwtKing.


Solution

  • It is as easy as adding 2 strings.

    If you want to auto retweet tweets having both @ShoutGamers and @RtwtKing in a single tweet you can just:

    my_bot.auto_rt("@ShoutGamers @RtwtKing", count=2200)
    

    If you want to auto retweet tweets having @ShoutGamers and @RtwtKing not together you can use bot.auto_rt() twice:

    my_bot.auto_rt("@ShoutGamers", count=2200)
    my_bot.auto_rt("@RtwtKing", count=2200)