coursera-dl / edx-dl

A simple tool to download video lectures from edx.org (and other openedx sites)
GNU Lesser General Public License v3.0
1.92k stars 638 forks source link

can't download subtitles #508

Open vikiaiteam opened 6 years ago

vikiaiteam commented 6 years ago

🚨Please review the Troubleshooting section before reporting any issue. Don't forget also to check the current issues to avoid duplicates.

Subject of the issue

Describe your issue here.

Your environment

Steps to reproduce

Tell us how to reproduce this issue. Please provide us the course URL, and the specific subsection or unit if possible.

Expected behaviour

Tell us what should happen.

Actual behaviour

Tell us what happens instead. If the script fails, please copy the entire output of the command or the stacktrace (don't forget to obfuscate your username and password). If you cannot copy the exception, attach a screenshot.

vikiaiteam commented 6 years ago

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.coursera.org', port=443): Max retries exceeded with url: /api/subtitleAssetProxy.v1/uq1JM9AmTOmtSTPQJrzpIg?expiry=1528070400000&hmac=L8SOIkLS09oQ6MOR2xoYQhNTgSEL4_kpgtwQf8k7Tsg&fileExtension=txt (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:833)'),))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "c:\python36\lib\site-packages\coursera\parallel.py", line 32, in _download_wrapper return url, self._file_downloader.download(url, *args, kwargs) File "c:\python36\lib\site-packages\coursera\downloaders.py", line 54, in download self._start_download(url, filename, resume) File "c:\python36\lib\site-packages\coursera\downloaders.py", line 329, in _start_download r = self.session.get(url, stream=True, headers=headers) File "c:\python36\lib\site-packages\requests\sessions.py", line 521, in get return self.request('GET', url, kwargs) File "c:\python36\lib\site-packages\requests\sessions.py", line 508, in request resp = self.send(prep, send_kwargs) File "c:\python36\lib\site-packages\requests\sessions.py", line 618, in send r = adapter.send(request, kwargs) File "c:\python36\lib\site-packages\requests\adapters.py", line 506, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='www.coursera.org', port=443): Max retries exceeded with url: /api/subtitleAssetProxy.v1/uq1JM9AmTOmtSTPQJrzpIg?expiry=1528070400000&hmac=L8SOIkLS09oQ6MOR2xoYQhNTgSEL4_kpgtwQf8k7Tsg&fileExtension=txt (Caused by SSLError(SSLError(1, '[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:833)'),))

Zhijun166 commented 6 years ago

I'm from China, I use this vpn agent. I can retrieve the catalog video but it shows “urllib.error.URLError: <urlopen error Remote end closed connection without response” At the bottom
The completeness is like this:

File "c:\users\123\appdata\local\programs\python\python36\lib\site-packages\ed x_dl\edx_dl.py", line 1038, in main all_units = extractor(all_urls, headers, file_formats) File "c:\users\123\appdata\local\programs\python\python36\lib\site-packages\ed x_dl\edx_dl.py", line 469, in extract_all_units_in_parallel units = pool.map(mapfunc, urls) File "c:\users\123\appdata\local\programs\python\python36\lib\multiprocessing\ pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "c:\users\123\appdata\local\programs\python\python36\lib\multiprocessing\ pool.py", line 644, in get raise self._value File "c:\users\123\appdata\local\programs\python\python36\lib\multiprocessing\ pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "c:\users\123\appdata\local\programs\python\python36\lib\multiprocessing\ pool.py", line 44, in mapstar return list(map(args)) File "c:\users\123\appdata\local\programs\python\python36\lib\site-packages\ed x_dl\edx_dl.py", line 438, in extract_units page = get_page_contents(url, headers) File "c:\users\123\appdata\local\programs\python\python36\lib\site-packages\ed x_dl\utils.py", line 58, in get_page_contents result = urlopen(Request(url, None, headers)) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 223, in urlopen return opener.open(url, data, timeout) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 526, in open response = self._open(req, data) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 544, in _open '_open', req) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 504, in _call_chain result = func(*args) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "c:\users\123\appdata\local\programs\python\python36\lib\urllib\request.p y", line 1320, in do_open raise URLError(err) urllib.error.URLError: <urlopen error Remote end closed connection without respo nse>