def retweet(): # create an instance of the TwitterFollowBot # by default, the bot will look for a configuration file called config.txt in your current my_bot = TwitterBot() # autoretweets the 5(count) latest tweets that matches the hashtag my_bot.auto_rt("#AppleEvent", count=5) return {'message': 'retweeted successfully'}
def main(): #workingdir = os.getcwd() #Raybotdir = os.listdir(workingdir+"/AllBotConfig/") Raybotdir = os.listdir("https://guarded-chamber-8525.herokuapp.com/AllBotConfig/") for ig in Raybotdir: my_bot = TwitterBot("/AllBotConfig/"+ig) my_bot.auto_fav("#Rayviewz", count=30) #Automatically favourite any tweet with a specitfic phrase. my_bot.auto_rt("#Rayviewz", count=10) # Automatically retweet any tweet with a specitfic phrase.
def main(): #workingdir = os.getcwd() #Raybotdir = os.listdir(workingdir+"/AllBotConfig/") Raybotdir = os.listdir( "https://guarded-chamber-8525.herokuapp.com/AllBotConfig/") for ig in Raybotdir: my_bot = TwitterBot("/AllBotConfig/" + ig) my_bot.auto_fav( "#Rayviewz", count=30 ) #Automatically favourite any tweet with a specitfic phrase. my_bot.auto_rt( "#Rayviewz", count=10 ) # Automatically retweet any tweet with a specitfic phrase.
from TwitterFollowBot import TwitterBot #create a instance of twitter bot my_bot = TwitterBot() #sink with the local cache to find the exixting followers my_bot.sync_follows() #auto unfollow people who don't follow my_bot.auto_unfollow_nonfollowers() #auto follow the twitter handle that tweets on the given topic my_bot.auto_follow("docker", count=05) my_bot.auto_follow("devops", count=05) my_bot.auto_follow("kubernetes", count=05) #auto retweet when match is found with a specific topic my_bot.auto_rt("devops", count=2) #auto follow the followers my_bot.auto_follow_followers()
from TwitterFollowBot import TwitterBot my_bot = TwitterBot() my_bot.auto_follow("Retweet + Likes", count=1) my_bot.auto_rt("Retweet + Like", count=1) my_bot.auto_fav("Retweet + Like", count=1)
import tweepy from TwitterFollowBot import TwitterBot my_bot = TwitterBot() keywords = [line.rstrip('\n') for line in open('brands.txt')] follow = [line.rstrip('\n') for line in open('Followthese.txt')] charities = [line.rstrip('\n') for line in open('charities.txt')] my_bot.auto_fav("charity", count=1) var = 1 while var == 1: keywordcount = 0 while keywordcount < len(keywords): for keyword in keywords: my_bot.auto_rt(keyword, count=1) keywordcount += 1 followcount = 0 while followcount < len(follow): for user in follow: my_bot.auto_follow_followers_of_user(user, count=1) followcount += 1 charitycount = 0 while charitycount < len(charities): for charity in charities: my_bot.send_tweet("Dont forget to help out people at" + charity) charitycount += 1 print("Should start from top") print("Good bye :(")
def retweet(): my_bot = TwitterBot() my_bot.auto_rt("caa", count=10)
def retweet(event): my_bot = TwitterBot() hashtag = '#' + event['hashtag'] # autoretweets the 5(count) latest tweets that matches the hashtag my_bot.auto_rt(hashtag, count=5)