dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.73k stars 299 forks source link

How to resume download ? #118

Closed asampadeh closed 10 years ago

asampadeh commented 10 years ago

Hi d,

I made progress, able to download several chapters but suddenly it stops. I am not sure if it is due to sleeping/hibernate mode. It was very late at night that I did not check my notebook.

How to resume for the rest easily ?

Thanks for advise

Downloading https://class.coursera.org/cplusplus4c-002/lecture/download.mp4?lecture_id=109 -> cplusp lus4c-002\05_Module_5-_C_11_Standard_Containers_Iterators_and_Algorithms\03_5.3_Standard_Template_Li brary.mp4 [##################################################] 100% 27.07MB at 343.95KB/s Downloading: cplusplus4c-002\05_Module_5-_C_11_Standard_Containers_Iterators_and_Algorithms\04_5.4_I terator_Categories.txt Downloading https://class.coursera.org/cplusplus4c-002/lecture/subtitles?q=111_en&format=txt -> cplu splus4c-002\05_Module_5-_C_11_Standard_Containers_Iterators_and_Algorithms\04_5.4_Iterator_Categorie s.txt Resetting dropped connection: class.coursera.org Traceback (most recent call last): File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 428, in url open body=body, headers=headers) File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 280, in _ma ke_request conn.request(method, url, httplib_request_kw) File "C:\Python33\lib\http\client.py", line 1065, in request self._send_request(method, url, body, headers) File "C:\Python33\lib\http\client.py", line 1103, in _send_request self.endheaders(body) File "C:\Python33\lib\http\client.py", line 1061, in endheaders self._send_output(message_body) File "C:\Python33\lib\http\client.py", line 906, in _send_output self.send(msg) File "C:\Python33\lib\http\client.py", line 844, in send self.connect() File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 107, in con nect ssl_version=resolved_ssl_version) File "C:\Python33\lib\site-packages\requests\packages\urllib3\util.py", line 369, in ssl_wrap_sock et return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Python33\lib\ssl.py", line 245, in wrap_socket _context=self) File "C:\Python33\lib\ssl.py", line 345, in init raise x File "C:\Python33\lib\ssl.py", line 341, in init** self.do_handshake() File "C:\Python33\lib\ssl.py", line 548, in do_handshake self._sslobj.do_handshake() ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera-dl", line 6, in coursera_dl.main() File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera\coursera_dl.py", line 769, in main if download_class(args, class_name): File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera\coursera_dl.py", line 749, in download_class args.intact_fnames) File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera\coursera_dl.py", line 393, in download_lectures downloader.download(url, lecfn) File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera\downloaders.py", line 43, in download self._start_download(url, filename) File "D:\88-Kerjaan\20-Coursera\coursera-master\coursera\downloaders.py", line 273, in _start_download r = self.session.get(url, stream=True) File "C:\Python33\lib\site-packages\requests\sessions.py", line 347, in get return self.request('GET', url, _kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 335, in request resp = self.send(prep, _send_kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 438, in send r = adapter.send(request, **kwargs) File "C:\Python33\lib\site-packages\requests\adapters.py", line 327, in send raise ConnectionError(e)requests.exceptions.ConnectionError: HTTPSConnectionPool(host='class.coursera.org', port=443): Max retries exceeded with url: /cplusplus4c-002/lecture/subtitles?q=111_en&format=txt (Caused by <class ' ConnectionAbortedError'>: [WinError 10053] An established connection was aborted by the software in your host machine)

ghost commented 10 years ago

Looks like your connection is a bit unstable anyway to resume the download again initiate the download process and set the destination to the place where you previously were downloading to and it should resume

asampadeh commented 10 years ago

Hi K-Daw, how to set destination ?

D:\coursera-master>coursera-dl usage: coursera-dl [-h] [-c COOKIES_FILE] [-u USERNAME] [-n [NETRC]] [-p PASSWORD] [--about] [-b] [-f FILE_FORMATS] [-sf SECTION_FILTER] [-lf LECTURE_FILTER] [-rf RESOURCE_FILTER] [--wget [WGET]] [--curl [CURL]] [--aria2 [ARIA2]] [--axel [AXEL]] [-w WGET_BIN] [--curl_bin CURL_BIN] [--aria2_bin ARIA2_BIN] [--axel_bin AXEL_BIN] [-o] [-l LOCAL_PAGE] [--skip-download] [--path PATH] [--verbose-dirs] [--debug] [--quiet] [--add-class ADD_CLASS] [-r] [--combined-section-lectures-nums] [--hook HOOKS] [-pl] [--clear-cache] [--unrestricted-filenames] class_names [class_names ...]

ghost commented 10 years ago

@asampadeh Its -d PATH set the PATH to the previous destination where you were downloading...