python下载url文件


import requests
IMAGE_URL = 'url'
r = requests.get(IMAGE_URL)
with open('D:/test/img2.png', 'wb') as f:
    f.write(r.content)

评论
  目录