Mine Tweets between two dates in Python
Question: I would like to mine tweets for two keywords for a specific period of time. I
currently have the code below, but how do I add so it only mine tweets between
two dates? (10/03/2016 - 10/07/2016) Thank you!

    
    
    #Import the necessary methods from tweepy library
    from tweepy.streaming import StreamListener
    from tweepy import OAuthHandler
    from tweepy import Stream
    
    #Variables that contains the user credentials to access Twitter API 
    access_token = "ENTER YOUR ACCESS TOKEN"
    access_token_secret = "ENTER YOUR ACCESS TOKEN SECRET"
    consumer_key = "ENTER YOUR API KEY"
    consumer_secret = "ENTER YOUR API SECRET"
    
    
    #This is a basic listener that just prints received tweets to stdout.
    class StdOutListener(StreamListener):
    
        def on_data(self, data):
            print data
            return True
    
        def on_error(self, status):
            print status
    
    
    if __name__ == '__main__':
    
        #This handles Twitter authetification and the connection to Twitter Streaming API
        l = StdOutListener()
        auth = OAuthHandler(consumer_key, consumer_secret)
        auth.set_access_token(access_token, access_token_secret)
        stream = Stream(auth, l)
    
        #This line filter Twitter Streams to capture data by the keywords: 'python', 'javascript', 'ruby'
        stream.filter(track=['python', 'javascript', 'ruby'])
    


Answer: You can't. Have a look at [this
question](http://stackoverflow.com/questions/26205102/making-very-specific-
time-requests-to-the-second-on-twitter-api-using-python), that is the closest
you can get.

The Twitter API does not allow to search by time. Trivially, what you can do
is fetching tweets and looking at their timestamps afterwards in Python, but
that is highly inefficient.

