mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Removed old code for proxy support in streaming API modules
This commit is contained in:
parent
db52e8d851
commit
6baf417d35
@ -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):
|
||||
|
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user