, , tweepy :
import tweepy
class ProxyStream(tweepy.Stream):
def new_session(self):
super().new_session()
self.session.proxies = {
'https': 'http://proxy1:3128',
'http': 'http://proxy1:3128'
}
, ProxyStream tweepy.Stream, :
auth = tweepy.OAuthHandler('TWITTER_CONSUMER_KEY', 'TWITTER_CONSUMER_SECRET')
auth.set_access_token('TWITTER_ACCESS_TOKEN', 'TWITTER_ACCESS_TOKEN_SECRET')
stream = ProxyStream(auth, self, async=True)
HTTPS_PROXY , , .