我正在尝试使用此处所示的max_id
字段从 Twitter 时间轴中获取推文next_results
。(带有 next_results 的 Twython 搜索 API)
对于大多数查询,我得到了所需数量(500+)的推文,但对于某些查询,我得到的推文少于 200 条。
在查看 ' 中返回的内容时,next_results
我发现仅返回 100 条推文后,响应中next_results
缺少字段。查询的主题不能只有 200 条推文,因为我正在搜索该主题时正在流行,并且在 Twitter 上我可以看到超过 200 条推文。
是否还有其他人也面临这个问题。有什么解决方法吗?
以下是第二个响应'next_results'
中缺少该字段的输出。
TEST_PROGRAM >> Calling twitter to get tweets for #TheWorstLieEver
{u'count': 100, u'completed_in': 0.066, u'max_id_str': u'432942833725497345', u'since_id_str': u'0', **u'next_results': u'?max_id=432540545630494719&q=%23TheWorstLieEver&count=100&include
_entities=1&result_type=mixed'**, u'refresh_url': u'?since_id=432942833725497345&q=%23TheWorstLieEver&result_type=mixed&include_entities=1', u'since_id': 0, u'query': u'%23TheWorstLieEver
', u'max_id': 432942833725497345L}
{u'count': 100, u'completed_in': 0.111, u'max_id_str': u'432540545630494719', u'since_id_str': u'0', u'refresh_url': u'?since_id=432540545630494719&q=%23TheWorstLieEver&result_type=mixe
d&include_entities=1', u'since_id': 0, u'query': u'%23TheWorstLieEver', u'max_id': 432540545630494719L}