python下载文件

import requests

url = 'https://wed.aliyuncs.com/AFEh/1606784111421_d2fff27f.mp4'

r = requests.get(url)
with open("./file/"+fname, "wb") as code:
  code.write(r.content)