Changeset 691 for confluence
- Timestamp:
- 11/25/09 11:10:07 (8 months ago)
- Files:
-
- 1 modified
-
confluence/emailfilters/twitterbouncer.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
confluence/emailfilters/twitterbouncer.py
r679 r691 13 13 import re 14 14 try: 15 from twyt import twitter 15 from twyt import twitter, data 16 16 except ImportError: 17 17 print "Dude, you need to install the python twyt module for this to work." … … 93 93 t = twitter.Twitter() 94 94 t.set_auth(username, password) 95 t.block_create(user) 95 96 friendstring = t.user_friends() 97 friends = data.simplejson.loads(friendstring) 98 friendnames = [f["screen_name"] for f in friends] 99 if unicode(user) in friendnames: 100 print "You're following this person! Not blocking." 101 else: 102 print "BLOCKING!" 103 t.block_create(user) 96 104 except Exception, e: 97 105 print "Out of cheese error, redo from start: %s" % e
