Skip to content

Instantly share code, notes, and snippets.

@sjtalkar
Created October 22, 2022 16:49
Show Gist options
  • Save sjtalkar/50bcefe0086c6736ce74a8b070c65e10 to your computer and use it in GitHub Desktop.
Save sjtalkar/50bcefe0086c6736ce74a8b070c65e10 to your computer and use it in GitHub Desktop.
Get tweet location example
#Credit : https://brittarude.github.io/blog/2021/08/01/Location-and-geo-information-in-twitter
new_search = "EdTech -filter:retweets"
tweets = tweepy.Cursor(api.search_tweets,
q=new_search,
place_country="DE",
lang="de",
since='2020-07-14').items(100)
users_locs = [[tweet.text, tweet.user.location, tweet.place] for tweet in tweets]
users_locs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment