from tweepy import StreamListener


class TweetListener(StreamListener):
    tweets_per_tick_counter = 0
    tweets = []

    def on_data(self, data):
        if len(self.tweets) < 10:
            self.tweets.append(data)
        self.tweets_per_tick_counter += 1

    def get_count(self):
        temp = self.tweets_per_tick_counter
        self.tweets_per_tick_counter = 0
        return temp

    def get_tweets(self):
        temp = self.tweets
        self.tweets = []
        return temp

18b854ff32de9d35d28c0b004a6deb5e20afab7c
<mask token>


class TweetListener(StreamListener):
    <mask token>
    <mask token>

    def on_data(self, data):
        if len(self.tweets) < 10:
            self.tweets.append(data)
        self.tweets_per_tick_counter += 1
    <mask token>

    def get_tweets(self):
        temp = self.tweets
        self.tweets = []
        return temp

<mask token>


class TweetListener(StreamListener):
    <mask token>
    <mask token>

    def on_data(self, data):
        if len(self.tweets) < 10:
            self.tweets.append(data)
        self.tweets_per_tick_counter += 1

    def get_count(self):
        temp = self.tweets_per_tick_counter
        self.tweets_per_tick_counter = 0
        return temp

    def get_tweets(self):
        temp = self.tweets
        self.tweets = []
        return temp

<mask token>


class TweetListener(StreamListener):
    tweets_per_tick_counter = 0
    tweets = []

    def on_data(self, data):
        if len(self.tweets) < 10:
            self.tweets.append(data)
        self.tweets_per_tick_counter += 1

    def get_count(self):
        temp = self.tweets_per_tick_counter
        self.tweets_per_tick_counter = 0
        return temp

    def get_tweets(self):
        temp = self.tweets
        self.tweets = []
        return temp

from tweepy import StreamListener


class TweetListener(StreamListener):
    tweets_per_tick_counter = 0
    tweets = []

    def on_data(self, data):
        if len(self.tweets) < 10:
            self.tweets.append(data)
        self.tweets_per_tick_counter += 1

    def get_count(self):
        temp = self.tweets_per_tick_counter
        self.tweets_per_tick_counter = 0
        return temp

    def get_tweets(self):
        temp = self.tweets
        self.tweets = []
        return temp
