Automatic Resume for timeout downloads
Closed this issue · 5 comments
Dear Khan,
One thing is suggested.
Some downloads are being halted, it may be timeout or network disconnection. For such cases, scripts shall try automatic after an extent of period.
Usually, we went to bed after clicking to run the script, expecting all downloaded in next morning.
And lots of connection errors during Downloading course information stage, please consider add auto-retry mechanism to that too.
*] : 28.49MB/20.17MB 70.80% |#####################---------| 180.25kB/s eta 00:47sTraceback (most recent call last):
File "lynda-dl.py", line 349, in
main()
File "lynda-dl.py", line 345, in main
lynda.course_download(path=options.output, quality=options.quality)
File "lynda-dl.py", line 198, in course_download
self.download_lectures_and_captions(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=lecture_index, lectures_count=lectures_count, subtitle=lecture_subtitles, filepath=filepath)
File "lynda-dl.py", line 146, in download_lectures_and_captions
self.download_lectures(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=inner_index, lectures_count=lectures_count, filepath=filepath)
File "lynda-dl.py", line 123, in download_lectures
retval = lecture_best.download(filepath=filepath, quiet=True, callback=self.show_progress)
File "C:\Users\Agabus\lynda-dl-ede577f\lynda_shared.py", line 410, in download
chunk = response.read(chunksize)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 449, in read
n = self.readinto(b)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\http\client.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\socket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:\Users\Agabus\AppData\Local\Programs\Python\Python36\lib\ssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
I am sorry for this long code, but this is what I see often when I am downloading. Can it be of help
@oyedeyeye you should upgrade your packages such as. requests and requests[security]