3

I am trying to connect to a login page(https page) using requests. My code:

import requests
requests.get('https page')

This still returns:

SSLError: [Errno 1] _ssl.c:504: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error

I set verify=False but it still returns the same error.

54.224.239.54
  • 77
  • 1
  • 8

2 Answers2

7

Install requests module like this. This will install the security package extras.

pip install requests[security]
salmanwahed
  • 9,450
  • 7
  • 32
  • 55
4

The server requires SNI (server name indication) and will cause a TLS alert if the SNI extension is not used. SNI is available with python 3 and with python 2.7.9+. For older versions of python see using requests with TLS doesn't give SNI support.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172