diff --git a/src/twitter/buffers/indibidual.py b/src/twitter/buffers/indibidual.py index 6dbed956..0a0be8c9 100644 --- a/src/twitter/buffers/indibidual.py +++ b/src/twitter/buffers/indibidual.py @@ -10,14 +10,7 @@ log = original_logger.getLogger("TimelinesStream") class timelinesStreamer(TwythonStreamer): def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, timeout=300, retry_count=None, retry_in=10, client_args=None, handlers=None, chunk_size=1, session=None): self.session = session - args = None - if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "": - args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]), - "https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}} - if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "": - auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"]) - args["auth"] = auth - super(timelinesStreamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, timeout=60, retry_count=None, retry_in=180, client_args=args, handlers=None, chunk_size=1) + super(timelinesStreamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, timeout=60, retry_count=None, retry_in=180, handlers=None, chunk_size=1) self.lists = self.session.lists def on_error(self, status_code, data): diff --git a/src/twitter/buffers/stream.py b/src/twitter/buffers/stream.py index 438ffe93..77929082 100644 --- a/src/twitter/buffers/stream.py +++ b/src/twitter/buffers/stream.py @@ -9,14 +9,7 @@ log = original_logger.getLogger("MainStream") class streamer(TwythonStreamer): def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, sessionObject, *a, **kw): - args = None - if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "": - args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]), - "https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}} - if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "": - auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"]) - args["auth"] = auth - super(streamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, client_args=args, *a, **kw) + super(streamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, *a, **kw) self.session = sessionObject self.muted_users = self.session.db["muted_users"] # self.blocked_users = []