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

[BUG] No cookie available #407

Closed
cawhyred opened this issue Dec 1, 2022 · 20 comments
Closed

[BUG] No cookie available #407

cawhyred opened this issue Dec 1, 2022 · 20 comments
Labels
bug Something isn't working

Comments

@cawhyred
Copy link

cawhyred commented Dec 1, 2022

I am trying to use this for the first time but after entering email and pw it is giving this error.

No cookie available
Exception in redeem courses: Unable to get csrf_token

@Cwarcup
Copy link

Cwarcup commented Dec 2, 2022

Same here. Not sure if it makes a difference but I'm running on MacOS 13.0.1, pip 22.3.1 and python 3.10.

The error occurs after the initial setup via udemy_enroller or udemy_enroller --browser=chrome.

I can see the saved data in my user folder.

After I enter my credentials and then run udemy_enroller --browser=chrome I get the following error:

 raise ValueError(f"There is no such driver by url {resp.url}")
ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/108.0.5359.71/chromedriver_mac64_m1.zip

@tynzer
Copy link

tynzer commented Dec 6, 2022

I am trying to use this for the first time but after entering email and pw it is giving this error.

No cookie available Exception in redeem courses: Unable to get csrf_token

Yes I have same problem with windows

@tigecyclindamycin
Copy link

Same error: after running "udemy_enroller" > input and save username + password, I get:

Loading existing settings
No cookie available
Exception in redeem courses: Unable to get csrf_token

@hannaxd
Copy link

hannaxd commented Dec 12, 2022

Same problem on Linux as well

@cullzie
Copy link
Collaborator

cullzie commented Dec 20, 2022

Hey All,
I am not seeing this issue.
Are you running the latest version of the library? (4.1.2)
Are you running behind a vpn? This can sometimes cause issues.

@cullzie cullzie added the bug Something isn't working label Dec 20, 2022
@cullzie cullzie changed the title No cookie available [BUG] No cookie available Dec 20, 2022
@hannaxd
Copy link

hannaxd commented Dec 20, 2022

I've just tried it again, in my case I'm using version 4.1.2 which is installed through pip and Python 3.10

Also not using any VPN or proxy

Full output:

/home/ruby/.local/lib/python3.10/site-packages/requests/__init__.py:102: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (5.1.0)/charset_normalizer (2.0.12) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({})/charset_normalizer ({}) doesn't match a supported "
Loading existing settings
No cookie available
Exception in redeem courses: Unable to get csrf_token```

@Oka4444
Copy link

Oka4444 commented Dec 23, 2022

same here
> python3 udemy_enroller.py Loading existing settings No cookie available Exception in redeem courses: Unable to get csrf_token

@cullzie
Copy link
Collaborator

cullzie commented Dec 23, 2022

Unfortunately until I have the issue I cannot do much about this one. Usually this is a sign that some changes are rolling out but only for specific regions. Can you tell me what region you are in @Oka4444 @wxifuwu ? Maybe I could reproduce with a vpn

@hannaxd
Copy link

hannaxd commented Dec 23, 2022

In my case it's Germany

@cawhyred
Copy link
Author

@cullzie India

@daverck
Copy link

daverck commented Dec 25, 2022

This issue is the same as #409

@ghost
Copy link

ghost commented Dec 29, 2022

same here. i was on a VPN and i turned it off but still getting the same error.
Loading existing settings No cookie available Exception in redeem courses: Unable to get csrf_token

@compukation
Copy link

same here, I haven't found .cookies in .udemy_enroller, maybe the script isn't creating

@ghost
Copy link

ghost commented Jan 16, 2023

I am trying to use this for the first time but after entering email and pw it is giving this error.

No cookie available Exception in redeem courses: Unable to get csrf_token

it's working now. use @Asunnya's commit or just the developer branch.

@MuhammadAmir1
Copy link

still not working with dev branch too. Exception in redeem courses: Unable to get csrf_token. I've tried in windows, linux, with python 3.11, 3.10,3.8. but all failed. same cookie error I manually created .cookie file then this works fine. but .cookie file not created automatically.

@ghost
Copy link

ghost commented Jan 26, 2023

still not working with dev branch too. Exception in redeem courses: Unable to get csrf_token. I've tried in windows, linux, with python 3.11, 3.10,3.8. but all failed. same cookie error I manually created .cookie file then this works fine. but .cookie file not created automatically.

get it from the release history and then update the udemy_rest.py file as in the dev branch. it's not working for me anymore though. i am now getting this error:

HTTP error while trying to fetch Udemy information 403 Client Error: Forbidden for url: https://www.udemy.com/api-2.0/users/me/subscribed-courses/?ordering=-last_accessed&fields%5Bcourse%5D=@min,enrollment_time,published_title,&fields%5Buser%5D=@min&page=1&page_size=100 Unable to fetch existing courses. Login was not successful Exception in redeem courses: 403 Client Error: Forbidden for url: https://www.udemy.com/api-2.0/users/me/subscribed-courses/?ordering=-last_accessed&fields%5Bcourse%5D=@min,enrollment_time,published_title,&fields%5Buser%5D=@min&page=1&page_size=100

it looks like the request is being blocked now. udemy has made changes like more captchas probably.

@cullzie
Copy link
Collaborator

cullzie commented Mar 7, 2023

The latest version (4.1.3) has just been released to master and pypi.
Please let me know if the issues above have been resolved. Thanks

@matalve
Copy link

matalve commented Mar 8, 2023

Still have the same issue unfortunately.

$ udemy_enroller
Loading existing settings
No cookie available
Exception in redeem courses: Unable to get csrf_token

@cullzie
Copy link
Collaborator

cullzie commented Mar 9, 2023

@matalve Could you please confirm you are on the latest version?
Running with udemy_enroller --debug should output the version details.
If not you you are likely on the older version of the library. In which case can you check with pip to see the version installed. Thanks

@matalve
Copy link

matalve commented Mar 10, 2023

@matalve Could you please confirm you are on the latest version? Running with udemy_enroller --debug should output the version details. If not you you are likely on the older version of the library. In which case can you check with pip to see the version installed. Thanks

You are absolutely correct, after "pip install udemy_enroller -U" it works again. Thank you very much for you good work.

@cullzie cullzie closed this as completed Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests