--- a/script/lib/iri_tweet/iri_tweet/stream.py Tue Dec 18 10:40:15 2012 +0100
+++ b/script/lib/iri_tweet/iri_tweet/stream.py Tue Dec 18 12:26:05 2012 +0100
@@ -68,7 +68,7 @@
"""A network connection to Twitters streaming API
- :param auth: tweepy auth object.
+ :param auth: requests auth object.
:keyword catchup: Number of tweets from the past to get before switching to
live stream.
:keyword raw: If True, return each tweet's raw data direct from the socket,
@@ -168,14 +168,11 @@
if self._catchup_count:
postdata["count"] = self._catchup_count
- if self._auth:
- self._auth.apply_auth(self.url, "POST", headers, postdata)
-
if self._logger : self._logger.debug("BaseStream init connection url " + repr(self.url))
if self._logger : self._logger.debug("BaseStream init connection headers " + repr(headers))
if self._logger : self._logger.debug("BaseStream init connection data " + repr(postdata))
- self._resp = requests.post(self.url, headers=headers, data=postdata, prefetch=False)
+ self._resp = requests.post(self.url, auth=self._auth, headers=headers, data=postdata, stream=True)
if self._logger : self._logger.debug("BaseStream init connection " + repr(self._resp))
self._resp.raise_for_status()