def unfollow(self): """ Check all friends to se if some is not worth following anymore, then unfollow them """ logging.info(u"check for users to unfollow") friendship_checker = FriendshipChecker(settings.METHOD_UNFOLLOW) self._gather_friends() for i in self.friends: user = twitter_access.get_user(i, self.api) logging.info(u"CHECK: "+unicode(user.screen_name) +u" ____________________________") if user.screen_name in whitelist or friendship_checker.run(user): time.sleep(60) continue logging.info(u"unfollow: " + unicode(user.screen_name)) if not settings.SAFE: twitter_access.destroy_friendship(user.screen_name,self.api) time.sleep(60)
def unfollow(self): """ Check all friends to se if some is not worth following anymore, then unfollow them """ logging.info(u"check for users to unfollow") friendship_checker = FriendshipChecker(settings.METHOD_UNFOLLOW) self._gather_friends() for i in self.friends: user = twitter_access.get_user(i, self.api) logging.info(u"CHECK: " + unicode(user.screen_name) + u" ____________________________") if user.screen_name in whitelist or friendship_checker.run(user): time.sleep(60) continue logging.info(u"unfollow: " + unicode(user.screen_name)) if not settings.SAFE: twitter_access.destroy_friendship(user.screen_name, self.api) time.sleep(60)
def unfollow_not_follow_backs(self): """ Unfollow people not following back, unless user is whitelisted """ logging.info(u"check for users not following back") self._gather_friends_followers() user_ids = set(self.friends).difference(set(self.followers)) if not user_ids: logging.info(u"Every one is following back") for i in user_ids: user = twitter_access.get_user(i, self.api) if user.screen_name in whitelist: time.sleep(60) continue logging.info(u"unfollow_not_follow_backs: " + unicode(user.screen_name)) if not settings.SAFE: twitter_access.destroy_friendship(i,self.api) time.sleep(60)
def unfollow_not_follow_backs(self): """ Unfollow people not following back, unless user is whitelisted """ logging.info(u"check for users not following back") self._gather_friends_followers() user_ids = set(self.friends).difference(set(self.followers)) if not user_ids: logging.info(u"Every one is following back") for i in user_ids: user = twitter_access.get_user(i, self.api) if user.screen_name in whitelist: time.sleep(60) continue logging.info(u"unfollow_not_follow_backs: " + unicode(user.screen_name)) if not settings.SAFE: twitter_access.destroy_friendship(i, self.api) time.sleep(60)