debakarr / kodekloud-downloader

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

AttributeError: 'Request' object has no attribute 'get_full_url' #21

Closed kanthucourses closed 2 months ago

kanthucourses commented 9 months ago

please help me out to solve this..here is the error message

63 OpenShift 3 for the Absolute Beginners Premium Container Orchestration, Containers, DevOps 64 Ansible Advanced Course Premium Automation, DevOps, IAC 65 Learn Ansible Basics – Beginners Course Premium Automation, DevOps, IAC 66 Docker – SWARM SERVICES STACKS – Hands-on Premium Containers, DevOps 67 DevOps Pre-Requisite Course Premium Automation, DevOps, IAC 68 Learning Linux Basics Course & Labs Premium DevOps, Linux
69 Shell Scripts for Beginners Premium DevOps
70 GIT for Beginners Premium DevOps, Programming

+-----+-----------------------------------------------------------------------------+---------+------------------------------------------------------------------------+ Enter the courses you want to select (Multiple courses can be passes using this format 1,6-9,10-11): 32 Traceback (most recent call last): File "c:\users\srika\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\srika\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\srika\AppData\Local\Programs\Python\Python38\Scripts\kodekloud.exe__main.py", line 7, in File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 783, in invoke return callback(*args, *kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\cli.py", line 50, in dl download_course( File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\main.py", line 50,in download_course video_info = get_video_info(lesson.url, cookie=cookie).get("url") File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\helpers.py", line 154, in get_video_info info = ydl.extract_info(url, download=False) File "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1567, in wrapper return func(self, args, **kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1702, in __extract_info ie_result = ie.extract(url) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\common.py", line 715, in extract ie_result = self._real_extract(url) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\extractor\generic.py", line 2430, in _real_extract full_response = self._request_webpage(url, video_id, headers={ File "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\yt_dlp_patch.py", line 14, in _patched_urlopen url = req.get_full_url() AttributeError: 'Request' object has no attribute 'get_full_url'

AliFarajzade commented 9 months ago

I have the same issue

debakarr commented 9 months ago

For now, fixed in changes pushed.

Try installing using pip install -U git+https://github.com/debakarr/kodekloud-downloader.git

kanthucourses commented 9 months ago

i have tried this but still the same issue. can you please check it

debakarr commented 9 months ago

i have tried this but still the same issue. can you please check it

Hi, from your terminal can you do pip freeze and paste the output here?

kanthucourses commented 9 months ago

i have tried this but still the same issue. can you please check it

Hi, from your terminal can you do pip freeze and paste the output here?

C:\Users\srika>pip freeze beautifulsoup4==4.12.2 Brotli==1.1.0 certifi==2023.7.22 charset-normalizer==3.2.0 click==8.1.7 colorama==0.4.6 decorator==5.1.1 idna==3.4 kodekloud-downloader @ git+https://github.com/debakarr/kodekloud-downloader.git@44ad618925cfa8895528b94ee7ebbd733d20036c markdownify==0.11.6 mutagen==1.47.0 prettytable==3.9.0 pycryptodomex==3.19.0 requests==2.31.0 six==1.16.0 soupsieve==2.5 urllib3==2.0.5 validators==0.20.0 wcwidth==0.2.6 websockets==11.0.3 yt-dlp==2023.9.24 please check it

debakarr commented 9 months ago

@kanthucourses Looks like it is pointing to older commit. I did made a release yesterday. Try doing

pip uninstall kodekloud-downloader -y
pip install -U kodekloud-downloader
kanthucourses commented 9 months ago

@kanthucourses Looks like it is pointing to older commit. I did made a release yesterday. Try doing

pip uninstall kodekloud-downloader -y
pip install -U kodekloud-downloader

thank you so much.. it is working fine now

kanthucourses commented 9 months ago

hi, i got error in the middle of download. can you please check it WARNING: The download speed shown is only of one thread. This is a known issue [download] 96.6% of ~ 15.19MiB at 310.27KiB/s ETA 00:01 (frag 28/29)Traceback (most recent call last): File "c:\users\srika\appdata\local\programs\python\python38\lib\urllib\request.py", line 1317, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 1230, in request self._send_request(method, url, body, headers, encode_chunked) File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 1276, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 1225, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 1004, in _send_output self.send(msg) File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 944, in send self.connect() File "c:\users\srika\appdata\local\programs\python\python38\lib\http\client.py", line 1399, in connect self.sock = self._context.wrap_socket(self.sock, File "c:\users\srika\appdata\local\programs\python\python38\lib\ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "c:\users\srika\appdata\local\programs\python\python38\lib\ssl.py", line 1040, in _create self.do_handshake() File "c:\users\srika\appdata\local\programs\python\python38\lib\ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:1108)

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

Traceback (most recent call last): File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 4051, in urlopen return self._request_director.send(req) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\networking\common.py", line 114, in send response = handler.send(request) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\networking_helper.py", line 204, in wrapper return func(self, *args, **kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\networking\common.py", line 325, in send return self._send(request) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\networking_urllib.py", line 424, in _send handle_response_read_exceptions(cause) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\networking_urllib.py", line 342, in handle_response_read_exceptions handle_sslerror(e) File "c:\users\srika\appdata\local\programs\python\python38\lib\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:1108)

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

Traceback (most recent call last): File "c:\users\srika\appdata\local\programs\python\python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\users\srika\appdata\local\programs\python\python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\srika\AppData\Local\Programs\Python\Python38\Scripts\kodekloud.exe__main.py", line 7, in File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1157, in call return self.main(*args, kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\click\core.py", line 783, in invoke return callback(*args, kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\cli.py", line 50, in dl download_course( File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\main.py", line 55, in download_course download_video_lesson(lesson, file_path, cookie, quality) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\main.py", line 102, in download_video_lesson download_video( File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\kodekloud_downloader\helpers.py", line 110, in download_video ydl.download(url) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 3510, in download self.__download_wrapper(self.extract_info)( File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 3485, in wrapper res = func(*args, *kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1567, in wrapper return func(self, args, kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1723, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1802, in process_ie_result return self.extract_info( File "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1567, in wrapper return func(self, *args, **kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1723, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 1782, in process_ie_result ie_result = self.process_video_result(ie_result, download=download) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 2921, in process_video_result self.process_info(new_info) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 3369, in process_info partial_success, real_download = self.dl(fname, new_info) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\YoutubeDL.py", line 3108, in dl return fd.download(name, new_info, subtitle) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\common.py", line 455, in download ret = self.real_download(filename, info_dict) File "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\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 "c:\users\srika\appdata\local\programs\python\python38\lib\concurrent\futures_base.py", line 611, in result_iterator yield fs.pop().result() File "c:\users\srika\appdata\local\programs\python\python38\lib\concurrent\futures_base.py", line 432, in result return self.get_result() File "c:\users\srika\appdata\local\programs\python\python38\lib\concurrent\futures_base.py", line 388, in __get_result raise self._exception File "c:\users\srika\appdata\local\programs\python\python38\lib\concurrent\futures\thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\fragment.py", line 500, in _download_fragment download_fragment(fragment, ctx_copy) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\fragment.py", line 472, in download_fragment if not self._download_fragment( File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\fragment.py", line 124, in _downloadfragment success, = ctx['dl'].download(fragment_filename, fragment_info_dict) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\common.py", line 455, in download ret = self.real_download(filename, info_dict) File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\http.py", line 364, in real_download establish_connection() File "c:\users\srika\appdata\local\programs\python\python38\lib\site-packages\yt_dlp\downloader\http.py", line 120, in establish_connection ctx.data = self.ydl.urlopen(request) File "c:\users\srika\appdata\local\programs\python\python38\lib\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

neelu7569 commented 9 months ago

+1 I also faced the same issue download is stopped in the middle Can you please help me on this? I want to download videos with audio in this free week

debakarr commented 9 months ago

+1 I also faced the same issue download is stopped in the middle Can you please help me on this? I want to download videos with audio in this free week

May I know which course you are trying?

neelu7569 commented 9 months ago

+1 I also faced the same issue download is stopped in the middle Can you please help me on this? I want to download videos with audio in this free week

May I know which course you are trying?

I tried ArgoCD

kanthucourses commented 9 months ago

+1 I also faced the same issue download is stopped in the middle Can you please help me on this? I want to download videos with audio in this free week

May I know which course you are trying?

i have tried jenkins,terraform

neelu7569 commented 9 months ago

I tried downloading course with colab working fine, but on local it is stopping at middle Anyways main moto is to get course that is successful. @debakarr Thank you so much for this!!!

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?

debakarr commented 9 months ago

To download other course you can just run the last cell again and give the new number.