[英]How can i download and save file from fileserver in python
I am using python and requests library. 我正在使用python和请求库。
I have my file generated on intranet fileserver with url like 我的文件在Intranet文件服务器上生成,URL为
url = "\\\\int\\appdata\\test\\data.txt"
If directly tupe that in browser , it saves the files. 如果直接在浏览器中将其删除,它将保存文件。 but i want to download the file using python
但我想使用python下载文件
requests.get(url)
says invalid url 说无效网址
Using Python, how can I access a shared folder on windows network? 使用Python,如何访问Windows网络上的共享文件夹?
Use forward slashes to specify the UNC Path: 使用正斜杠指定UNC路径:
open('//HOST/share/path/to/file')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.