add prefetch=False to streaming example

This commit is contained in:
Gareth Lloyd
2012-09-06 15:13:46 +01:00
parent c8f166f696
commit d9a85560a2
+1 -1
View File
@@ -283,7 +283,7 @@ To use the Twitter Streaming API to track the keyword "requests"::
import json
r = requests.post('https://stream.twitter.com/1/statuses/filter.json',
data={'track': 'requests'}, auth=('username', 'password'))
data={'track': 'requests'}, auth=('username', 'password'), prefetch=False)
for line in r.iter_lines():
if line: # filter out keep-alive new lines