Tweepy - is it possible to stream exact phrases?

£可爱£侵袭症+ 提交于 2019-12-24 17:16:22

问题


TheStreamer.filter(languages=["en"], track=['Bruno Mars is lovely'])

Is there a way to get this to track an exact phrase, rather than relevant phrases? For instance,

'Bruno Mars really is a lovely man'

would probably be a result, which I don't want.


回答1:


As per the documentation for track

Exact matching of phrases (equivalent to quoted phrases in most search engines) is not supported.

So the simple answer is no, you cannot prevent matching tweets in which all words are present in any order and with any punctuation with this technique. You're going to have to filter out results that don't match your criteria after the fact.



来源:https://stackoverflow.com/questions/36645685/tweepy-is-it-possible-to-stream-exact-phrases

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!