Mottl / GetOldTweets3

A Python 3 library and a corresponding command line utility for accessing old tweets
MIT License
367 stars 126 forks source link

how can i get city name and cordinates of each tweet? #51

Open Ubaid93 opened 4 years ago

Ubaid93 commented 4 years ago

how can i get city name and cordinates of each tweet?

marquisvictor commented 4 years ago

I think we would have to use Twitter API and Tweepy to get that info.

marquisvictor commented 4 years ago

But we can't get old tweets using that method. I wish it were possible here

parayamelo commented 4 years ago

Same issue here. The csv has a "geo" column but it is always empty. @Mottl do you know the issue?

Mottl commented 4 years ago

It seems like Tweeter is no more sharing a geo location within the <span class="Tweet-geo" ...> tag. There is no such a tag in https://twitter.com/i/search/timeline data which is used for tweets retrieval.

parayamelo commented 4 years ago

I see, so the only way would be to pass the near argument to actually get tweets from a particular region/area.

Mottl commented 4 years ago

Yes, but what if you want to collect all the tweets on the given subject?..

parayamelo commented 4 years ago

Exactly, that is the problem I am facing right now, it is either one or the other, apparently.... What do you recommend?

Mottl commented 4 years ago

Use the official Tweeter API which I think has this capability.

parayamelo commented 4 years ago

I agree but then we are stuck with the 7 days limit.... Anyway, thanks for the tool! I like how easy it is to use!

badaouisaad commented 4 years ago

Dear Mottl,

I am facing similar issue where the column "geo" is always empty and i saw your response when you said

"It seems like Tweeter is no more sharing a geo location within the <span class="Tweet-geo" ...> tag. There is no such a tag in https://twitter.com/i/search/timeline data which is used for tweets retrieval."

However, does it mean that we can not filter tweets by locations using got.manager.TweetCriteria().setQuerySearch("#BLM").setNear("Minnesota, USA").setWithin("1000km") ?

Are two issues "geocode" tag and "setnear" related to each other?

Thanks very much

badaouisaad commented 4 years ago

Any comment on my last comment? Thank you