Screenshot of the problem:
Mental process
First, the request parameters are determined. The URLs are consistent, but an error is reported
Method 1:
import requests
requests. get(‘ https://www.google.com/ ‘,verify=False)
If it’s not solved, it’s not the agent’s reason
Method 2:
session = requests. session()
session. keep_ Alive = false # close redundant connections
Using session error reporting session request
It still hasn’t been solved. Generally, it can be solved at this step, but an error is still reported when executing python
Finally, I found that I was out of my mind. Since the header request header directly copies other items, just annotate the “content length”: “143” in it. Only remember that the header in the later step is better to use the header of the current interface. You can delete redundant values yourself. It’s not convenient to pull an item from other items, which will increase the troubleshooting time
Similar Posts:
- [Solved] Python urlib2gaierror: [Errno 11004] getaddrinfo failed
- This content should also be served over HTTPS
- Python3 Use urlliburlopen error EOF occurred in violation of protocol (_ssl.c:841)
- hessian http response code:411 [How to Solve]
- Resource interpreted as Stylesheet but transferred with MIME type text/html: css not work
- Mixed Content: The page at was loaded over HTTPS, but requested an insecure image.
- Visit the back-end application through nginx and report an error err_ CONTENT_ LENGTH_ MISMATCH
- Python 2.7 and 3.4 requests Error: No module named ‘zlib’
- What does HTTP status code 304 mean
- [Solved] requests.exceptions.InvalidSchema: No connection adapters were found for