Twitter API: How to search only for geotagged tweets

后端 未结 5 928
傲寒
傲寒 2021-02-01 18:27

How can I use Twitter Search API (or other) to get a list of tweets which have the \"geo\" param?

--EDIT--

By example: I wont get list

5条回答
  •  庸人自扰
    2021-02-01 18:45

    You can look for every tweet but save only the geotaged ones. I know it dont make a lot of sense, but works quite well.

    if you call you search results, you can state

    for result in results:
        if result.geo != None:
            print result.text.encode('utf-8', errors='ignore')  # or do anything you want with the tweets
    

提交回复
热议问题