【问题标题】:Is it possible to perform a NOT search using the Twitter streaming API through Tweepy?是否可以通过 Tweepy 使用 Twitter 流 API 执行 NOT 搜索?
【发布时间】:2018-09-11 09:57:42
【问题描述】:
twitterStream.filter(track=["aids","hiv","hiv aids"])

track=["aids","hiv"] 给我,艾滋病或艾滋病毒

track=["aids hiv"] 给予、艾滋病和艾滋病毒。

但是,我们为 NOT 做什么?

【问题讨论】:

标签: tweepy twitter-streaming-api


【解决方案1】:

Twitter 的 API 过滤器和跟踪没有针对 NOT 运算符的特定情况,可能 not 查询往往会返回太多结果并且计算量很大。 Tweepy 模仿 Twitter API 过滤器和跟踪,因此您无法在查询中执行 NOT。

此处记录了跟踪/过滤器: https://developer.twitter.com/en/docs/tweets/filter-realtime/guides/basic-stream-parameters

你可以做的是根据标签删除你不需要的流之后。

【讨论】:

    猜你喜欢
    • 2012-09-02
    • 2015-03-31
    • 2022-12-18
    • 2013-09-05
    • 2014-12-21
    • 2015-12-31
    • 2013-01-07
    • 1970-01-01
    • 2018-01-12
    相关资源
    最近更新 更多