[英]Tracking hashtag with geolocation - tweepy
I want to track all tweets of a particular hashtag but i need only the tweets with geolocation. 我想跟踪特定主题标签的所有推文,但我只需要具有地理位置的推文。 This line not working fine, the results are all tweets with geolocation.
这条线不能正常工作,结果都是带有地理位置的推文。
stream.filter(track=["hashtag"],locations = GEOBOX_WORLD)
This work fine. 这项工作很好。
stream.filter(track=["hashtag"])
This work fine. 这项工作很好。
stream.filter(locations = GEOBOX_WORLD)
But the union of track and location don't work. 但是,轨道和位置的结合是行不通的。 There is some solution (without check tweet by tweet if .geo != None)?
有一些解决方案(如果.geo!= None,则不逐条检查tweet)? Thanks.
谢谢。
You can't filter both things at once, you need to choose one and then check the other. 您不能同时过滤这两种东西,需要选择一种然后再检查另一种。 Here you can find a more detailed answer to a similar question: How to add a location filter to tweepy module
在这里,您可以找到类似问题的更详细答案: 如何向tweepy模块添加位置过滤器
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.