requests.exceptions.SSLError的错误握手:握手不好

时间:2016-05-30 08:09:50

标签: python tweepy

我使用了以下代码

while(!text.equals("stop"))
{
  System.out.print("Insert the number of items, holder value and passing value:");
  text = input.nextLine();

  if (text.equalsIgnoreCase ("stop")) break;

  String arr [] = text.split (" ");
  int items = Integer.valueOf (arr[0]);
  int holder = Integer.valueOf (arr[1]);
  int passing =  Integer.valueOf (arr[2]);
  killBot5000 josephus = new killBot5000(items,holder,passing);
  josephus.execute();
}

我收到了以下错误消息。

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
screen_name =[]

class CustomStreamListener(tweepy.StreamListener):
    def on_status(self, status):
        if '#selffile' in status.text.lower():
            print status.text #status.author.screen_name

    def on_error(self, status_code):
        print >> sys.stderr, 'Encountered error with status code:',     status_code
        return True # Don't kill the stream

    def on_timeout(self):
        print >> sys.stderr, 'Timeout...'
        return True # Don't kill the stream
sapi = tweepy.streaming.Stream(auth, CustomStreamListener())    
sapi.filter(locations=[5.0770049095, 47.2982950435, 15.0403900146, 54.9039819757], async=False,follow=None)

有没有人有想法解决这个问题?

`

1 个答案:

答案 0 :(得分:0)

Twitter不再支持SSLv3,您需要使用TLS。您可能需要更新您的Tweepy版本。