Ejemplo n.º 1
0
    def getText(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)
        tweets = w.getStatusMany(user_id, crawl_count = self.n_page)
        if not tweets:  # if tweets are empty, it means some exception occurred
            self.handleException(user_id)

        return tweets
Ejemplo n.º 2
0
 def getText(self, user_id):
     w = CrawlWorker(self.token_queue)
     tweets = w.getStatusMany(user_id, self.crawl_count)
     return tweets