3

I am trying to download all tweets within some co-ordinate.

Code used:

stream.statuses.filter(track='Football',locations='22,70,24,74')

How can I pass more than one track such that It will download all tweets which contains one more tracks?

For example: 'Football' or 'game' or 'sport'.

4

1 回答 1

2

Twitter API看来,您可以很容易地实现这一点。

您可以用空格分隔它,以获取具有两个轨道的推文:

stream.statuses.filter(track='Football game',locations='22,70,24,74')

或者通过逗号,获取带有任一轨道的推文:

stream.statuses.filter(track='Football, game',locations='22,70,24,74')

我认为 twython 只传递轨道的值,所以这应该可以正常工作。

希望这可以帮助!

于 2013-10-24T09:17:00.680 回答