r0oth3x49 / acloud-dl

A cross-platform python based utility to download courses from acloud.guru for personal offline use.
MIT License
350 stars 141 forks source link

ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2635) #119

Open JackyWay opened 7 months ago

JackyWay commented 7 months ago

Thank you so much for this project; it has greatly assisted me in self-studying and easily reviewing the course materials.

When I was downloading one of the courses, it initially ran smoothly. However, after downloading for a while, I encountered the following error and the download failed. I am using Windows 10 as my operating system.

Is there a way to fix this issue? Once again, thank you so much for this project.

Do I need to re-download the course, or can I resume from where it was interrupted?


[*] : Downloading chapter : (5 of 8)
[+] : Chapter (05 Staying in control)
[*] : Found (8) lectures ...

[*] : Lecture(s) : (1 of 8)
[*] : Downloading (001 Introduction)
[*] : 8.99MB/8.99MB 100.00% |##############################| 4.90MB/s 
[+] : Downloaded  (001 Introduction)

[*] : Lecture(s) : (2 of 8)
[*] : Downloading (002 Locking Down Global Administrator)
Traceback (most recent call last):
  File "acloud-dl.py", line 446, in <module>
    main()
  File "acloud-dl.py", line 434, in main
    cloud_guru.course_download(path=options.output, quality=options.quality,
  File "acloud-dl.py", line 333, in course_download
    self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title,
  File "acloud-dl.py", line 211, in download_lectures_only
    self.download_lectures(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=inner_index,
  File "acloud-dl.py", line 191, in download_lectures
    retval = lecture_best.download(filepath=filepath, quiet=True, user_extension=user_extension,
  File "Z:\MyData\Coding\GitHub\acloud-dl\acloud\_shared.py", line 472, in download
    chunk = response.read(chunksize)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 455, in read
    n = self.readinto(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 499, in readinto
    n = self.fp.readinto(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:2635)
JackyWay commented 7 months ago

Regarding the previous issue, I have tried downloading again, and it now works. However, it appears that there is no option to skip the downloaded file, resulting in a re-download for the entire course.

I am currently encountering another issue and will attempt again. It would be greatly beneficial if we could resume from where we left off or skip the already downloaded files. Thank you.

[*] : Lecture(s) : (2 of 11)
[*] : Downloading (002 Volumes and Snapshots)
Traceback (most recent call last):
  File "acloud-dl.py", line 446, in <module>
    main()
  File "acloud-dl.py", line 434, in main
    cloud_guru.course_download(path=options.output, quality=options.quality,
  File "acloud-dl.py", line 333, in course_download
    self.download_lectures_only(lecture_best=lecture_best, lecture_title=lecture_title,
  File "acloud-dl.py", line 211, in download_lectures_only
    self.download_lectures(lecture_best=lecture_best, lecture_title=lecture_title, inner_index=inner_index,
  File "acloud-dl.py", line 191, in download_lectures
    retval = lecture_best.download(filepath=filepath, quiet=True, user_extension=user_extension,
  File "Z:\MyData\Coding\GitHub\acloud-dl\acloud\_shared.py", line 389, in download
    response = compat_urlopen(req)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 525, in open
    response = self._open(req, data)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 542, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 502, in _call_chain
    result = func(*args)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 1397, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\urllib\request.py", line 1358, in do_open
    r = h.getresponse()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 1344, in getresponse
    response.begin()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\http\client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2635)