title: SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
body: <p>I want to scrape results from my company portal. It seems that my company intranet portal uses ping SSO to login.</p>
  <p>So when I try to login, it is not asking for my username and password. When I go to the link <a href="https://portal.mycompany.com" rel="nofollow noreferrer">https://portal.mycompany.com</a>, it directs to <a href="https://ping-sso.mycompany.com/idp/.." rel="nofollow noreferrer">https://ping-sso.mycompany.com/idp/..</a>. and then redirects to <a href="https://portal.mycompany.com" rel="nofollow noreferrer">https://portal.mycompany.com</a></p>
  <p>How do I login to the website using python and scrape results?</p>
  <p>I tried to login directly using requests and I got the below error</p>
  <pre><code>r = requests.get(&quot;https://mycompanyintranetportal.com/home&quot;,
                   verify=&quot;C:/Users/me/AppData/Local/Programs/Python/Python37/webscraping/Lib/site-packages/certifi/cacert.pem&quot;)
  </code></pre>
  <blockquote>
  <p>SSLError: HTTPSConnectionPool(host='mycompanyintranetportal.com', port=443):
  Max retries exceeded with url: /home (Caused by SSLError(SSLError(&quot;bad
  handshake: Error([('SSL routines', 'tls_process_server_certificate',
  'certificate verify failed')])&quot;)))</p>
  </blockquote>
  <p>One good thing  found is that I am able to access the ping SSO of mycompany portal.</p>
  <pre><code>requests.get(&quot;https://ping-mycompanyintranetportal.com/idp/ZGgWP/resumeSAML21/idp/SSO.ping&quot;)
  </code></pre>
  <p>Can someone help me with this please?</p>