mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #840 from gareth-lloyd/develop
add prefetch=False to streaming example
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user