Exemple #1
0
 def follow_trendy_users():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("** Following trendy users: **")
     trends = BotLogic.find_trending_topics_in_usa()
     BotLogic.find_users_to_follow_based_on_trend_list(trends)
     print("** Done Following trendy users... **")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #2
0
 def refresh_db():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print(
         'Updating user-timeline & mentions DBs... This may take a few mins...'
     )
     BotLogic.refresh_usertimeline_db()
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #3
0
 def retweet_trending_topics():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print(
         "Now, I'm searching for trending topics in the USA for posts to retweet..."
     )
     usa_trends = BotLogic.find_trending_topics_in_usa()
     BotLogic.retweet_hashtags(usa_trends)
     print("**Done Retweeting...**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #4
0
 def unfollow_nonfollowers():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("Unfollowing those that don't me...")
     me = api.me().screen_name
     followers = BotLogic.get_my_followers()
     following = BotLogic.get_people_i_follow()
     BotLogic.unfollow_nonfollowers(followers, following)
     print("**Done unfollowing...**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #5
0
 def follow_back():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("Giving my followers the ol' follow back...")
     me = api.me().screen_name
     followers = BotLogic.get_my_followers()
     following = BotLogic.get_people_i_follow()
     BotLogic.follow_back(followers, following)
     print("**Done with 'Follow Back'**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #6
0
 def reply_to_mentions_and_follow():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("Replying to user's that have mentioned me and following them!")
     # Set all tweets that mention my user to list:
     mentions = api.mentions_timeline(tweet_mode='extended')
     following = BotLogic.get_people_i_follow()
     BotLogic.retweet_favorite_follow(mentions, following)
     print("**Done with mentions...**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #7
0
 def post_status():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     try:
         status = BotLogic.pick_status()
         api.update_status(status)
         print("-> Status posted!!!")
     except tweepy.TweepError as error:
         print("-> Couldn't update your status this time around.")
         print(f"-> Error: {error.reason}")
         pass
     print("**Done with Status...**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #8
0
 def retweet_my_hashtags():
     hashtags = [
         '#dc',
         '#sanfrancisco',
         '#la',
         '#ny',
         '#webdevelopment',
         '#skateboarding',
         '#WashingtonDC',
         '#sanfrancisco',
         '#losangeles',
         '#dmvmusic',
         '#coding',
         '#100daysofcode',
         '#dcrestaurant',
         '#sfrestaurant',
         '#larestaurant',
         '#nyrestaurant',
         '#gamedev',
         '#dcevents',
         '#sfevents',
         '#laevents',
         '#nyevents',
         '#dcnightlife',
         '#lanightlife',
         '#sfnightlife',
         '#nynightlife',
         '#ufc',
         '#gamingnews',
         '#newmusic',
         '#ustreetdc',
     ]
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("Now, I'm searching for hashtag posts to retweet...")
     BotLogic.retweet_hashtags(hashtags)
     BotLogic.find_users_to_follow_based_on_trend_list(hashtags)
     print("**Done Retweeting...**")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #9
0
 def remove_old_tweets_from_timeline():
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
     print("Picking a status from the list...")
     BotLogic.delete_old_tweets()
     print(f"≤≤≤ Done deleting tweets ≥≥≥")
     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=")
Exemple #10
0
# ---------------------------------- Run Bot --------------------------------- #
if __name__ == "__main__":
    print('|-|-|Configuring twitter-to-sqlite...|-|-|')
    TwitterBot.create_auth_json()
    sleep(10)
    while True:
        print("Twitter Bot Started!")
        print('┬─┬ノ( º _ ºノ)')
        TwitterBot.remove_old_tweets_from_timeline()
        print('(╯°□°)╯︵ ┻━┻')
        TwitterBot.refresh_db()
        TwitterBot.post_status()
        print('┬─┬ノ( ಠ ل͜ಠノ)')
        print("////-------Med Rest Period-------////")
        BotLogic.med_wait()
        TwitterBot.retweet_my_hashtags()
        print('(┛ಠ_ಠ)┛彡┻━┻')
        print("////-------Medium Rest Period-------////")
        BotLogic.med_wait()
        TwitterBot.follow_back()
        TwitterBot.post_status()
        print('┳━┳ ヽ(ಠل͜ಠ)ノ')
        print("////-------Medium Rest Period-------////")
        BotLogic.med_wait()
        TwitterBot.retweet_trending_topics()
        print('(╯°Д°)╯︵/(.□ . \)')
        print("////-------Medium Rest Period-------////")
        BotLogic.med_wait()
        TwitterBot.follow_trendy_users()
        TwitterBot.post_status()