python+requests——读取二进制文件并保存在本地——一个视频文件作为示例

 

import requests

url = 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'

resp = requests.get(url)

with open('C:\\Users\\del\\Desktop\\新建文件夹\\3.mp4','wb') as f:
    f.write(resp.content)

 

转自:https://www.cnblogs.com/xiaobaibailongma/p/12354154.html

posted @ 2021-06-17 18:51  一路向北321  阅读(333)  评论(0编辑  收藏  举报