Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Unauthorized for url while downloading #68

Open
rahulgamezop opened this issue Sep 18, 2024 · 5 comments
Open

Getting Unauthorized for url while downloading #68

rahulgamezop opened this issue Sep 18, 2024 · 5 comments

Comments

@rahulgamezop
Copy link

rahulgamezop commented Sep 18, 2024

I am getting this error every time after downloading some files

Traceback (most recent call last):
  File "/usr/local/bin/kodekloud", line 8, in <module>
    sys.exit(kodekloud())
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/kodekloud_downloader/cli.py", line 69, in dl
    download_course(
  File "/usr/local/lib/python3.10/dist-packages/kodekloud_downloader/main.py", line 145, in download_course
    response.raise_for_status()
  File "/usr/local/lib/python3.10/dist-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://learn-api.kodekloud.com/api/lessons/4fa712b1-8c9c-458c-92d2-f3973b91b798?course_id=14863046-8679-403e-98f9-d24de464f3e5
@amitfegade121
Copy link

amitfegade121 commented Sep 19, 2024

Your cookie is expired. Re-generate it.

@Fasibcs
Copy link

Fasibcs commented Sep 19, 2024

Getting the same issue, regenerate cookie is not helping either.

@Fasibcs
Copy link

Fasibcs commented Sep 19, 2024

If anyone has found the issue and is helping it resolved would be appreciated.

@rahulgamezop
Copy link
Author

regenerate and replacing cookie works for me but the issue is new cookie also expired before downloading full course. Is there any solution that I can resume downloading from the point where it failed. Due to this I am not able to download the full course and after replacing the cookie it starts from the beginning.

@ivan-n20
Copy link

Getting the same issue, regenerate cookie is not helping either.

Try using a new temporary email and generate cookie. Seemed to work for me when regenerating did not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants