Esempio n. 1
0
    def getFollowing(self, user_id):
        # first check if the user is marked as an exception
        if self.isExceptionHappened(user_id):
            return []

        # otherwise crawl
        w = CrawlWorker(self.token_queue)
        following = w.getFollowing(user_id)
        if not following:  # if tweets are empty, it means some exception occurred
            self.handleException(user_id)

        return following
 def getFollowing(self, user_id):
     w = CrawlWorker(self.token_queue)
     following_t = w.getFollowing(user_id = user_id)
     return user_id, following_t