0

I am using python and requests library.

I have my file generated on intranet fileserver with url like

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

requests.get(url)

says invalid url

Karl
  • 2,903
  • 5
  • 27
  • 43
  • Doesn't your browser auto-convert that URL to use the 'file:///' protocol? – willnx Mar 16 '16 at 01:38
  • @willnx yes i think browser does that . I even tried file:/// in requests as well but it does not work – Karl Mar 16 '16 at 01:42

1 Answers1

0

Using Python, how can I access a shared folder on windows network?

Use forward slashes to specify the UNC Path:

open('//HOST/share/path/to/file')
Community
  • 1
  • 1
tanglong
  • 278
  • 2
  • 11