debakarr / kodekloud-downloader

Simple downloaded for https://kodekloud.com/
103 stars 34 forks source link

Download stopping in the middle #22

Closed neelu7569 closed 2 months ago

neelu7569 commented 9 months ago

KodeKloud started as free week access on premium cources. I'm trying to download videos but it is downloading only .en.vtt files which has subtitles info. And also it is throwing ERROR - Access denied while downloading video or audio file from link.... Can you please help me on this? I want to download videos with audio in this free week

Resolved but I'm facing below issue

neelu7569 commented 9 months ago

ETA 00:00 (frag 26/27)Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1286, in request self._send_request(method, url, body, headers, encode_chunked) File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1332, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1281, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1041, in _send_output self.send(msg) File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 979, in send self.connect() File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1458, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1108, in _create self.do_handshake() File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1379, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4051, in urlopen return self._request_director.send(req) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/common.py", line 114, in send response = handler.send(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/_helper.py", line 204, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/common.py", line 325, in send return self._send(request) ^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/_urllib.py", line 424, in _send handle_response_read_exceptions(cause) File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/_urllib.py", line 342, in handle_response_read_exceptions handle_sslerror(e) File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/networking/_urllib.py", line 335, in handle_sslerror raise SSLError(cause=e) from e yt_dlp.networking.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1006)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/opt/homebrew/bin/kodekloud", line 8, in sys.exit(kodekloud()) ^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1157, in call return self.main(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/kodekloud_downloader/cli.py", line 57, in dl download_course(url=course_url, cookie=cookie, quality=quality, output_dir=output_dir) File "/opt/homebrew/lib/python3.11/site-packages/kodekloud_downloader/main.py", line 55, in download_course download_video_lesson(lesson, file_path, cookie, quality) File "/opt/homebrew/lib/python3.11/site-packages/kodekloud_downloader/main.py", line 102, in download_video_lesson download_video( File "/opt/homebrew/lib/python3.11/site-packages/kodekloud_downloader/helpers.py", line 110, in download_video ydl.download(url) File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3510, in download self.__download_wrapper(self.extract_info)( File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3485, in wrapper res = func(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1556, in extract_info return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1567, in wrapper return func(self, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1723, in __extract_info return self.process_ie_result(ie_result, download, extra_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1802, in process_ie_result return self.extract_info( ^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1556, in extract_info return self.extract_info(url, self.get_info_extractor(key), download, extra_info, process) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1567, in wrapper return func(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1723, in extract_info return self.process_ie_result(ie_result, download, extra_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1782, in process_ie_result ie_result = self.process_video_result(ie_result, download=download) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 2921, in process_video_result self.process_info(new_info) File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3369, in process_info partial_success, real_download = self.dl(fname, new_info) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 3108, in dl return fd.download(name, new_info, subtitle) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/common.py", line 455, in download ret = self.real_download(filename, info_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/dash.py", line 60, in real_download return self.download_and_append_fragments_multiple(args, is_fatal=lambda idx: idx == 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/fragment.py", line 385, in download_and_append_fragments_multiple return self.download_and_append_fragments(args[0], *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/fragment.py", line 506, in download_and_append_fragments for fragment, frag_index, frag_filename in pool.map(_download_fragment, fragments): File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator yield _result_or_cancel(fs.pop()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel return fut.result(timeout) ^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 456, in result return self.get_result() ^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in get_result raise self._exception File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/fragment.py", line 500, in _download_fragment download_fragment(fragment, ctx_copy) File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/fragment.py", line 472, in download_fragment if not self._download_fragment( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/fragment.py", line 124, in _downloadfragment success, = ctx['dl'].download(fragment_filename, fragment_info_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/common.py", line 455, in download ret = self.real_download(filename, info_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/http.py", line 364, in real_download establish_connection() File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/downloader/http.py", line 120, in establish_connection ctx.data = self.ydl.urlopen(request) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 4065, in urlopen raise RequestError( yt_dlp.networking.exceptions.RequestError: SSLV3_ALERT_HANDSHAKE_FAILURE: The server may not support the current cipher list. Try using --legacy-server-connect

debakarr commented 9 months ago

Check once this issue https://github.com/yt-dlp/yt-dlp/issues/7099

neelu7569 commented 9 months ago

Check once this issue yt-dlp/yt-dlp#7099

Can you specify what needs to be done

neelu7569 commented 9 months ago

Hi, I was able to download 1 course but if I'm trying to download other course via colab at this command I'm running into an error

MOUNT DRIVE

from google.colab import drive drive.mount('/content/drive')


ValueError Traceback (most recent call last) in <cell line: 2>() 1 from google.colab import drive ----> 2 drive.mount('/content/drive')

1 frames /usr/local/lib/python3.10/dist-packages/google/colab/drive.py in _mount(mountpoint, force_remount, timeout_ms, ephemeral, readonly) 190 raise ValueError('Mountpoint must not be a symlink') 191 if _os.path.isdir(mountpoint) and _os.listdir(mountpoint): --> 192 raise ValueError('Mountpoint must not already contain files') 193 if not _os.path.isdir(mountpoint) and _os.path.exists(mountpoint): 194 raise ValueError('Mountpoint must either be a directory or not exist')

ValueError: Mountpoint must not already contain files

I also tried with this

from google.colab import drive drive.mount('/content/drive' , force_remount = True)

but I'm getting same error

Can you please help me out?

melvincv commented 9 months ago

Me too, same issue.

I am using WSL 2 on Windows 11.

Command: kodekloud dl -q 720p -o "/mnt/d/kodekloud-videos" -c "/mnt/d/kodekloud-videos/kodekloud.com_cookies.txt" https://kodekloud.com/courses/prometheus-certified-associate-pca/

Error:

[vimeo] Extracting URL: https://player.vimeo.com/video/775419636?h=8754330bad&dnt=1&app_id=122963&controls=1&autoplay=1&m...-browser%2F%22%7D%7D
[vimeo] 775419636: Downloading webpage
[vimeo] 775419636: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 775419636: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 775419636: Downloading fastly_skyfire m3u8 information
[vimeo] 775419636: Downloading fastly_skyfire m3u8 information
[vimeo] 775419636: Downloading google_mediacdn m3u8 information
Traceback (most recent call last):
  File "/usr/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/usr/lib/python3.10/http/client.py", line 1283, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
    self.send(msg)
  File "/usr/lib/python3.10/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.10/http/client.py", line 1455, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "/usr/lib/python3.10/ssl.py", line 1071, in _create
    self.do_handshake()
  File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 4051, in urlopen
    return self._request_director.send(req)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/common.py", line 114, in send
    response = handler.send(request)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/_helper.py", line 204, in wrapper
    return func(self, *args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/common.py", line 325, in send
    return self._send(request)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/_urllib.py", line 424, in _send
    handle_response_read_exceptions(cause)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/_urllib.py", line 342, in handle_response_read_exceptions
    handle_sslerror(e)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/networking/_urllib.py", line 335, in handle_sslerror
    raise SSLError(cause=e) from e
yt_dlp.networking.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1007)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/melvin/.local/bin/kodekloud", line 8, in <module>
    sys.exit(kodekloud())
  File "/home/melvin/.local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/melvin/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/melvin/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/melvin/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/kodekloud_downloader/cli.py", line 73, in dl
    download_course(
  File "/home/melvin/.local/lib/python3.10/site-packages/kodekloud_downloader/main.py", line 127, in download_course
    download_video_lesson(lesson, file_path, cookie, quality)
  File "/home/melvin/.local/lib/python3.10/site-packages/kodekloud_downloader/main.py", line 174, in download_video_lesson
    download_video(
  File "/home/melvin/.local/lib/python3.10/site-packages/kodekloud_downloader/helpers.py", line 111, in download_video
    ydl.download(url)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3510, in download
    self.__download_wrapper(self.extract_info)(
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 3485, in wrapper
    res = func(*args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1556, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1567, in wrapper
    return func(self, *args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1723, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1802, in process_ie_result
    return self.extract_info(
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1556, in extract_info
    return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1567, in wrapper
    return func(self, *args, **kwargs)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1702, in __extract_info
    ie_result = ie.extract(url)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 715, in extract
    ie_result = self._real_extract(url)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/vimeo.py", line 848, in _real_extract
    return self._parse_config(config, video_id)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/vimeo.py", line 164, in _parse_config
    fmts, subs = self._extract_m3u8_formats_and_subtitles(
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 1965, in _extract_m3u8_formats_and_subtitles
    res = self._download_webpage_handle(
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 903, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 847, in _request_webpage
    return self._downloader.urlopen(self._create_request(url_or_request, data, headers, query))
  File "/home/melvin/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 4065, in urlopen
    raise RequestError(
yt_dlp.networking.exceptions.RequestError: SSLV3_ALERT_HANDSHAKE_FAILURE: The server may not support the current cipher list. Try using --legacy-server-connect
debakarr commented 2 months ago

This could be either WSL 2 issue https://github.com/microsoft/WSL/issues/8171 Or could be network issue. Would recommend checking those two.