您需要像这样设置Content-Disposition标头的filename参数:
response.content_disposition = 'attachment; filename="my_filename.txt"'
上一篇 Python 3:AttributeError:“模块”对象在终端中使用urllib时没有属性“ __path__”
下一篇 使用Python正则表达式提取数据
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号