The warning message you received is called "InsecureRequestWarning." It occurs when you make an HTTPS request to a host without verifying the certificate associated with the request. In your case, the request is being made to 'pypi.douban.com', which is a Python package repository.
Certificate verification is an important security measure to ensure that the HTTPS connection is secure and trustworthy. Without certificate verification, there is a possibility of a man-in-the-middle attack or connecting to an imposter server.
To resolve this warning, you should add certificate verification to your HTTPS request. In Python, you can achieve this by using the "verify" parameter in the request. By providing the path to the trusted CA bundle or setting it to "True" to use the system's default CA bundle, the request will be made securely.
Here is an example of how to add certificate verification to your HTTPS request:
import requests
url = 'https://pypi.douban.com'
response = requests.get(url, verify=True)
By specifying verify=True
, the request will be made with certificate verification, and the warning should no longer appear.