aapatre / Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE

Do you want to LEARN NEW STUFF for FREE? Don't worry, with the power of web-scraping and automation, this script will find the necessary Udemy coupons & enroll you for PAID UDEMY COURSES, ABSOLUTELY FREE!
GNU General Public License v3.0
3.16k stars 551 forks source link

[BUG] No cookie available #407

Closed cawhyred closed 1 year ago

cawhyred commented 1 year ago

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

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

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

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

Same problem on Linux as well

cullzie commented 1 year ago

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.

hannaxd commented 1 year ago

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

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

cullzie commented 1 year ago

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

In my case it's Germany

cawhyred commented 1 year ago

@cullzie India

daverck commented 1 year ago

This issue is the same as https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/issues/409

ghost commented 1 year ago

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

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

ghost commented 1 year ago

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

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

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

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

Still have the same issue unfortunately.

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

cullzie commented 1 year ago

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

@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.