2

In Linux we have a command wget -c with which we can continue or resume the download of the unfinished files. In python, by importing the wget library, I am not able to do the following feature. Wget -c also restricts the re-downloading of the preexisting file. Can anyone help me in finding a wget -c equivalent in wget library of python.?

ouflak
  • 2,458
  • 10
  • 44
  • 49
DevTar
  • 21
  • 4

2 Answers2

1

I don't know how wedded you are to the wget library, or if you could use alternatives.

You could do the same with urllib2

See this answer to a similar question about resuming a download when a problem arises.

Watty62
  • 602
  • 1
  • 5
  • 21
  • 1
    I have done it on comand line and wget gets the job done on the command line and in python we have a library of wget so was exploring it and couldnt find the ans to my question. – DevTar May 10 '18 at 09:29
  • OK - hopefully someone will propose a solution which works for you! – Watty62 May 10 '18 at 12:23
1

For HTTP you can use Requests library. It's elegant and simple. This script can be halpfull to download files, resume downloads and validate downloads.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 11 '21 at 06:15