Download and Save a file in python 2.7?

后端 未结 2 1548
说谎
说谎 2021-01-28 03:34

Coming from here:

Basic http file downloading and saving to disk in python?

Is there any possibility to save the file in any folder? I tried this but i get error

2条回答
  •  半阙折子戏
    2021-01-28 04:13

    The directory /myfolder/file.gz doesn't available in your server or pc. Make a real file path which exists in your pc or server. For example:

    ./file.gz
    file.gz
    

    This will save the file from where you are running your script. In other words, in the same location to your python script.

提交回复
热议问题