项目请求 极光推送接口 返回
/var/www/newymw3.1/venv/local/lib/python2.7/site-packages/urllib3/util/ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
ERROR:urllib3.connection:Certificate did not match expected hostname: bjapi.push.jiguang.cn. Certificate: {'notAfter': 'Jan 9 08:51:19 2021 GMT', 'subjectAltName': (('DNS', '*.jpush.cn'), ('DNS', 'jpush.cn')), 'subject': ((('countryName', u'CN'),), (('stateOrProvinceName', u'Guangdong'),), (('localityName', u'Shenzhen'),), (('organizationName', u'\u6df1\u5733\u5e02\u548c\u8baf\u534e\u8c37\u4fe1\u606f\u6280\u672f\u6709\u9650\u516c\u53f8'),), (('commonName', u'*.jpush.cn'),))}
解决方案:
- 在cmd中输入:
pip install pyopenssl ndg-httpsclient pyasn1