【发布时间】:2016-09-02 04:52:26
【问题描述】:
我想使用 Tweepy 从 Twitter firehose 进行流式传输,但我不确定 stream.sample(async=False) 是否可以在 firehose 模式下工作,或者它只是设计用于对流的 1% 进行采样?
如果它不适用于 firehose,应该如何使用 Tweepy 流式传输 firehose?
【问题讨论】:
标签: twitter tweepy twitter-streaming-api
我想使用 Tweepy 从 Twitter firehose 进行流式传输,但我不确定 stream.sample(async=False) 是否可以在 firehose 模式下工作,或者它只是设计用于对流的 1% 进行采样?
如果它不适用于 firehose,应该如何使用 Tweepy 流式传输 firehose?
【问题讨论】:
标签: twitter tweepy twitter-streaming-api
不,它没有。对于 firehose,应该调用 stream.firehose()。对于样本 stream.sample() 应该被调用。请注意,要使 firehose 工作,用户需要对 firehose 数据具有授权。
【讨论】:
stream.sample 的数据源是什么。众所周知,stream.userdata() 的数据源是出现在用户时间轴上的推文。那么sample的数据源是什么?