Download a file to a specific folder with python

后端 未结 1 1702
感动是毒
感动是毒 2020-12-31 21:38

I am trying to download a particular file to a specific folder on my hardisk. I am using IronPython 2.7 and urllib module.

I tried downloading the file

相关标签:
1条回答
  • 2020-12-31 21:53

    You may want to use this instead:

    import os
    import urllib
    
    fullfilename = os.path.join('C:/somedir', 'test.html')
    urllib.urlretrieve("http://www.google.com", fullfilename)
    
    0 讨论(0)
提交回复
热议问题