Merge pull request #840 from gareth-lloyd/develop

add prefetch=False to streaming example
This commit is contained in:
Kenneth Reitz
2012-09-07 00:06:51 -07:00
+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