Replace Stream proxies parameter with proxy
authorHarmon <Harmon758@gmail.com>
Sat, 23 Jan 2021 13:42:59 +0000 (07:42 -0600)
committerHarmon <Harmon758@gmail.com>
Sat, 23 Jan 2021 13:43:12 +0000 (07:43 -0600)
Resolves #1272

tweepy/streaming.py

index 43426732b32ab75a9a66ccc5967d69040fe6aff5..1ede502f4839c70828ef2d76c61d65333a99453a 100644 (file)
@@ -148,8 +148,10 @@ class Stream:
         self.retry_time = self.retry_time_start
         self.snooze_time = self.snooze_time_step
 
-        # Example: proxies = {'http': 'http://localhost:1080', 'https': 'http://localhost:1080'}
-        self.proxies = options.get("proxies")
+        self.proxies = {}
+        proxy = options.get("proxy")
+        if proxy:
+            self.proxies["https"] = proxy
 
     def _run(self, params=None, body=None):
         # Authenticate