📜  通过 python 请求下载文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:19.679000             🧑  作者: Mango

代码示例1
import requests

url = "url of the file"

response = requests.get(url, allow_redirects=True)
with open('filename', 'wb') as file:
  file.write(response.content)
  file.close()