debakarr / kodekloud-downloader

Simple downloaded for https://kodekloud.com/
138 stars 43 forks source link

no Menu for kodekloud dl #5

Closed CarlosJoseChaconChavarria closed 1 year ago

CarlosJoseChaconChavarria commented 1 year ago

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
ppa1985 commented 1 year ago

me too, no course list.

ppa1985 commented 1 year ago

Now I can download it. Thanks debakarr !!!

Tisona commented 1 year ago

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.

debakarr commented 1 year ago

Issue not seen. Will close.