Skip to content

Tag: python-requests

Download PDF from PeerJ

I am trying to use Python requests to download a PDF from PeerJ. For example, https://peerj.com/articles/1.pdf. My code is simply: However, the Response object returned displays as <Response [432]>, which indicates an HTTP 432 error. As far as I know, that error code is not assigned. When I examine r.te…

Verification for successful or failed login?

I would like to check if after the request I successfully connected to the site or not. I tried several methods that I know but nothing works. Can someone help me please? Answer If you logged in successfully server side will respond Set-Cookie header with authentication token. Let’s suppose that success…

PEM Certificate & TLS Verification against REST api

I have been provided with a pem certificate to authenticate with a third party. Authenticating using certificates is a new concept for me. Inside are two certificates and a private key. The issuer has advised they do not support SSL verification but use TLS(1.1/1.2). I have run a script as below: I’m ge…