title: Scrape tweets by tweet location and user location
body: <p>I am trying to use tweepy to download tweets using the tweet location and not by user location. Currently, I can download tweets with the user location but am not able to get the tweet location even if<code>geo_enabled</code> returns True.</p>
  
  <p>For example, suppose <code>user_a</code> is from New York but he tweets from California. I want both the user location, New York, and the tweet location, California.</p>
  
  <p>Code:</p>
  
  <pre><code>import tweepy
  from tweepy import Stream
  from tweepy import OAuthHandler
  from tweepy.streaming import StreamListener
  import pandas as pd
  import json
  import csv
  import sys
  reload(sys)
  sys.setdefaultencoding('utf8')
  
  ckey = 'key'
  csecret = 'secret'
  atoken = 'token'
  asecret = 'secret'
  #csvfile = open('StreamSearch.csv','a')
  #csvwriter = csv.writer(csvfile, delimiter = ',')
  
  class StdOutListener(StreamListener):
      def __init__(self, api=None):
          super(StdOutListener, self).__init__()
          self.num_tweets = 0
  
      def on_data(self, data):
          self.num_tweets += 1
          if self.num_tweets &lt; 5: #Remove the limit of no. of tweets to 5
              print data
              return True
          else:
              return False
  
      def on_error(self, status):
          print status
  
  
  l = StdOutListener()
  auth = OAuthHandler(ckey, csecret)
  auth.set_access_token(atoken, asecret)
  stream = Stream(auth, l)
  stream.filter(locations = [80.10,12.90,80.33,13.24] ) #user location 
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>userLocation, userTimezone, Coordinates,GeoEnabled, Language, TweetPlace
  London,UK      Amsterdam                  FALSE      en         null
  Aachen,Germany  Berlin                    TRUE       de         null
  Kewaunee Wi                               TRUE       en         null
  Connecticut, Eastern Time (US &amp; Canada)   TRUE       en         null
                                            TRUE       en         null
  Lahore, City of Gardens London            TRUE       en         null
  NAU class of 2018.  Arizona               FALSE      en         null
                                            FALSE      en         null
      Pacific Time (US &amp; Canada)            FALSE      en         null
  </code></pre>
  
  <p>The above given output is cleaned version of the massive data. Even though the <code>Geolocation</code> is enabled I am not able to get the tweet location and nor the <code>co-ordinates</code>.</p>