運(yùn)行python,發(fā)送get請(qǐng)求,請(qǐng)求后出現(xiàn)requests.exceptions.SSLError: ?(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
解決辦法:
import urllib3
導(dǎo)包后,將urllib3.disable_warnings()寫(xiě)在首部
# encoding:utf-8
import requests
import urllib3
import time
urllib3.disable_warnings()
添加參數(shù)?verify=False 到請(qǐng)求中文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-518986.html
response = requests.request(method='GET',
url='https://www.csv.com.cn/api/dc-app-order/open/up/code?signMode=1&clientId=af901bbe65jgebc3d0987a8d289&signTimestamp=123234455656&signData=hdfdgfgdgdfgfhgfh',
params={"outer_number":"662423253430992110","shopId":"A06J"},
verify=False,
json={"userCode": "13800000002", "password": "765496", "tag": "csv",
"locale": "CN"}, headers={"Content-Type": "text/plain"})
r = response.json()
再次運(yùn)行,正常啦。遇到后解決的小問(wèn)題,希望對(duì)你有幫助。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-518986.html
到了這里,關(guān)于GET請(qǐng)求帶參數(shù),請(qǐng)求后出現(xiàn)Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] [已解決]的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!