使用requests下载文件并显示网速和下载进度
# -*- coding: utf-8 -*-
import time
import requests
# 请求下载地址,以流式的。打开要下载的文件位置。
with requests.get('http://down.360safe.com/setup.exe', stream=True) as r, open('setup.exe', 'wb') as file:
# 请求文件的大小...
原创
2019-07-19 14:02:26 ·
1749 阅读 ·
0 评论