title: python SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))
body: <p>I was scraping this aspx website <a href="https://gra206.aca.ntu.edu.tw/Temp/W2.aspx?Type=2" rel="noreferrer">https://gra206.aca.ntu.edu.tw/Temp/W2.aspx?Type=2</a> . </p>
  
  <p>As it required, I have to parse in <strong>__VIEWSTATE</strong> and <strong>__EVENTVALIDATION</strong> while sending a <strong>post</strong> request. Now I am trying to send a <strong>get</strong> request first to have those two values, and then parse then afterward. </p>
  
  <p>However, I have tried several times to send a <strong>get</strong> request. It always turns out throwing this error message:</p>
  
  <blockquote>
    <p>requests.exceptions.SSLError: HTTPSConnectionPool(host='gra206.aca.ntu.edu.tw', port=443): Max retries exceeded with url: /Temp/W2.aspx?Type=2 (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')",),))</p>
  </blockquote>
  
  <p>I have tried: </p>
  
  <ol>
  <li>upgrade OpenSSL</li>
  <li>download requests[security]</li>
  </ol>
  
  <p>However, none of them works. </p>
  
  <p>I am currently using:</p>
  
  <pre><code>env:
  python 2.7
  bs4 4.6.0
  request 2.18.4
  openssl 1.0.2n
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>import requests
  from   bs4 import BeautifulSoup
  
  with requests.Session() as s:
      s.auth = ('user', 'pass')
      s.headers.update({'x-test': 'true'})
      url = 'https://gra206.aca.ntu.edu.tw/Temp/W2.aspx?Type=2'
      r = s.get(url, headers={'x-test2': 'true'})
  
  soup = BeautifulSoup(r.content, 'lxml')
  viewstate  = soup.find('input', {'id': '__VIEWSTATE'         })['value']
  validation = soup.find('input', {'id': '__EVENTVALIDATION'   })['value']  
  print viewstate, generator, validation
  </code></pre>