Skip to content

Commit

Permalink
Add some new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
uvsi committed Apr 9, 2015
1 parent 7f1be42 commit 6404d3a
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions twitter_follow_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
import os

# put your tokens, keys, secrets, and Twitter handle in the following variables
OAUTH_TOKEN = ""
OAUTH_SECRET = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
TWITTER_HANDLE = ""
OAUTH_TOKEN = "2754806952-yBAbRDdkxvYKpImjRnsm7MEwCsNszjpbel4ZDTY"
OAUTH_SECRET = "FFfebP9R2T43N4GUZhQntlzECCUulJoCDLZSaxPRbMp35"
CONSUMER_KEY = "nm18SuFGYtyZUJEpfoYjWApKe"
CONSUMER_SECRET = "brLlmlqjMt3rVCYH96oSuc4W9THrR8ndadpxEe1430PsFiDGjb"
TWITTER_HANDLE = "simonuvarov"

# put the full path and file name of the file you want to store your "already followed"
# list in
Expand Down Expand Up @@ -213,6 +213,10 @@ def auto_unfollow_nonfollowers():
print("unfollowed %d" % (user_id))


def mute_user_by_id(user_id):
t.mutes.users.create(user_id=user_id)


def auto_mute_following():
"""
Mutes everyone that you are following
Expand All @@ -228,8 +232,8 @@ def auto_mute_following():
# mute all
for user_id in not_muted:
if user_id not in users_keep_unmuted:
t.mutes.users.create(user_id=user_id)
print("muted %d" % (user_id))
mute_user_by_id(user_id)
print("muted %d" % user_id)


def auto_unmute():
Expand All @@ -246,3 +250,8 @@ def auto_unmute():
if user_id not in users_keep_muted:
t.mutes.users.destroy(user_id=user_id)
print("unmuted %d" % (user_id))


if __name__ == "__main__":
#auto_follow("tv shows", 100)
auto_mute_following()

2 comments on commit 6404d3a

@Lincete
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know you got public your tokens?.

@rhiever
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the author disabled the app account attached to those tokens.

Please sign in to comment.