我想使用https协议从我的服务器下载文件。我该怎么做呢? 这是我用http
的基本代码response=requests.get('http://url',stream='True')
handle=open('dest_file.txt','wb')
for chunk in response.iter_content(chunk_size=512):
if chunk: # filter out keep-alive new chunks
handle.write(chunk)
handle.close()
请求模块也可以用于https吗?
答案 0 :(得分:4)
根据http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification
+----------+-----------+-----------+
| ID| Procedure| Date|
| 30794324| 32| 2014-06-21|
| 30794324| 14| 2014-04-25|
+----------+-----------+-----------+