How to: Send Python request with client side certificate

This is part of a Python web download project. It is to scrape a https web site that will check client side digital certificate.

  1. If your digital certificate is in .pfx format, follow this to convert it using OpenSSL to .pem.
  2. Python code
import requests
url='https url'
certDir='path and name of the certificate'
s=requests.get(url,cert=certDir)
print(s.text)

Back To Top