TRoboto / datacamp-downloader

Download your completed courses on Datacamp easily!
MIT License
178 stars 52 forks source link

Can't login with the token #37

Closed LucasLBrandao closed 2 years ago

LucasLBrandao commented 3 years ago

Hi, i have issue when trying to login in datacamp. First i used the datacamp login command, testing both email and username, and in both cases the terminal return the following message:

WARNING: Couldn't run login with inputs ('MYUSERNAME', 'MYPASSWORD')

Then i tried the command set-token, following the instructions in documentation to get the token from Development tools, coping and pasting the Value of _dct key after the command. when i run the command, the terminal returned the following ERROR message:

ERROR: Incorrect input token!

I have verified in the development tool the presence of an authentication token in Storage cookies and tried that token in the command too, but I got the same error message.

TRoboto commented 3 years ago

Thank you for reporting this bug. After investigation, it turns out that this is related to Cloudflare protection. It may take some time before this issue is resolved. Contributions to solving this problem are most welcome.

akhdanfadh commented 3 years ago

I also have this problem. I hope the developer can fix it soon, thanks a lot!

ricardeb commented 2 years ago

I have the same issue, I couldn't login with my user / pass and neither with my token. Hopefully would be a fix soon.

Thank you so much for this awesome tool!

jorritvm commented 2 years ago

FYI, I tried upgrading cloud scraper from 1.2.56 (which is currently required by datacamp-downloader) to 1.2.58 as this version incorporates latest changes with cloudflare but it did not solve the issue for me.

TRoboto commented 2 years ago

Hopefully by the end of next week, this issue will be resolved. Next patch will also include better error messages.

For clarity, the issue is due Cloudflare protection v2 as denoted by cloudscraper.

CloudflareChallengeError: Detected a Cloudflare version 2 Captcha challenge, This feature is not available in the opensource (free) version.

TRoboto commented 2 years ago

Version 3.0 is finally out in PR #39. I'd love to hear your feedback about the new version, especially on this issue.

jorritvm commented 2 years ago

Hey, I added the result of my functional tests on the V3 PR. The login issue seems fixed so this can be closed in my opinion. Other issues are listed in the PR.

TRoboto commented 2 years ago

Thank you. This issue will be closed once the PR is merged.

TRoboto commented 2 years ago

Closing this issue as it has been resolved with the new version.