Python: Sslerror, bad Handshake, Unexpected EOF em get request

Asked

Viewed 85 times

0

I am trying to get a request on a specific site, but am having problems with the error listed below.

My code:

import requests

url = 'https://www.beneficiossociais.caixa.gov.br/consulta/beneficio/04.01.00-00_00.asp'
r = requests.get(url, verify=False)

The mistake::

Sslerror: Httpsconnectionpool(host='www.benefitssocial.caixa.gov.br', port=443): Max retries exceeded with url: /query/beneficio/04.01.00-00_00.Asp (Caused by Sslerror(Sslerror("bad Handshake: Syscallerror(-1, 'Unexpected EOF')")))

  • To access the benefit page you have to go through the query form to get an access token.

  • But this resquest itself is just a get to return me the HTML of the page without the form query.

  • The server will only give you the page if you have the token.

  • Try getting the API documentation on Dataprev

  • Probably you are using proxy on the network or somewhere what is failing in the validation of the request or your server where the script is running is poorly configured, there is no way to know, anyway the problem seems of INFRA and not of cõdigo.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.