Jefferson-Henrique / GetOldTweets-python

A project written in Python to get old tweets, it bypass some limitations of Twitter Official API.
MIT License
1.35k stars 809 forks source link

How to extract tweets using coordinates of the location #164

Open saurabh-9995 opened 6 years ago

saurabh-9995 commented 6 years ago

Can someone help me to extract tweets using the coordinates? I see that the Exporter.py contains a "geo" entity in the outputFile.write (line 60). But there are no coordinates in the extracted tweets. I want to extract the tweets specifying the coordinates similar to what we do by specifying a query/since/until etc. currently. If someone can fix this, it'll be a great help. Thanks :)

JLivingston01 commented 6 years ago

This is an important issue to attempt to solve and I would also be interested in a solution.

jjanjj commented 6 years ago

Have you found the solution? I also need the coordinates of the tweets but they are all empty. I am aware that not all of the tweets are geotagged but I find it wierd that none of them come with coordinates. Is there some other problem or there are actually no coordinates at all my collected tweets?

rahulha commented 6 years ago

There are two different requirements in this thread. 1) Search tweets based on given Geo Coordinates. This is not possible since Twitter itself doesn't have that feature. You can search using Location though ex. City, State, Country.

2) Required geo coordinates for each tweet. First, geo is deprecated by Twitter and they put all location information in Coordinates item of json response. Second with this Twitter scrapper twitter do not provide location information in search result. There is a way though but it takes time and reduce performance. You can hit the "permalink" and parse that html document and get the location info. You have to do this for each tweet.