debakarr / kodekloud-downloader

Simple downloaded for https://kodekloud.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no Menu for kodekloud dl

CarlosJoseChaconChavarria opened this issue · comments

kodekloud dl -o . -c C:\Users\my\Documents\KodeKloud\cookie.txt
+-----+------+------+------------+
| No. | Name | Type | Categories |
+-----+------+------+------------+
+-----+------+------+------------+
Enter the number of the course you want to select: 36
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Scripts\kodekloud.exe_main
.py", line 7, in
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\kodekloud_downloader\cli.py", line 50, in dl
selected_course = select_course(courses)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-1\AppData\Local\Programs\Python\Python311\Lib\site-packages\kodekloud_downloader\helpers.py", line 32, in select_course
course = courses[int(selected_course) - 1]
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

me too, no course list.

Now I can download it. Thanks debakarr !!!

commented

Downloader does not work when site owner enables Cloudflare protection.
Protection at Kodekloud was enabled for a while, probably due to huge traffic spike they faced.
To pass through protection, one should first pass Cloudflare JS challenge with ordinary browser, and then mimic this browser with python code using identical cookies and headers.

Issue not seen. Will close.