【问题标题】:Does Tweepy's stream.sample works for firehose data as well?Tweepy 的 stream.sample 是否也适用于 firehose 数据?
【发布时间】:2016-09-02 04:52:26
【问题描述】:

我想使用 Tweepy 从 Twitter firehose 进行流式传输,但我不确定 stream.sample(async=False) 是否可以在 firehose 模式下工作,或者它只是设计用于对流的 1% 进行采样?

如果它不适用于 firehose,应该如何使用 Tweepy 流式传输 firehose?

【问题讨论】:

    标签: twitter tweepy twitter-streaming-api


    【解决方案1】:

    不,它没有。对于 firehose,应该调用 stream.firehose()。对于样本 stream.sample() 应该被调用。请注意,要使 firehose 工作,用户需要对 firehose 数据具有授权。

    【讨论】:

    • 您好,我想知道stream.sample 的数据源是什么。众所周知,stream.userdata() 的数据源是出现在用户时间轴上的推文。那么sample的数据源是什么?
    猜你喜欢
    • 2015-11-23
    • 2020-09-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-10
    相关资源
    最近更新 更多