Closed fakeid30 closed 3 years ago
This is not google captcha on udemy site, this is separate cloudflare captcha.
Same problem here
Ye the captcha has changed. I've updated the code to allow the user solve it but I still could not progress beyond the captcha check
same here!
same here, it wont accept the captcha
I have a possible fix for this which is a big change to the code base so I need a while to test it fully. The premise of the change is just to login and enrol via the REST api. This would remove the dependency on browsers and improve the speed. However this is a pretty significant change so it may take time to iron out any issues with it.
@fakeid30 Do you think we could create a develop_beta branch. We can merge things into that and people can test it from there. Don't want to merge to develop and make things worse :smile:
@cullzie just create an alpha branch, since develop branch is already kind of a beta.
Possible fix for this is on alpha branch now. If anyone could test and report back any issues that would be great. Thanks
There are a lot of changes including removing some dependencies and adding some new ones as well as changing how we enrol in courses entirely. Any dependency updates are covered in requirements.txt and pyproject.toml
Not working alpha branch @cullzie
Not enough time to solve captcha
These are the errors
DevTools listening on ws://127.0.0.1:14636/devtools/browser/97d25227-fd2a-4b6d-8965-fbbef482e0bc [22588:5528:0213/154241.534:ERROR:device_event_log_impl.cc(211)] [15:42:41.535] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) [22588:5528:0213/154241.535:ERROR:device_event_log_impl.cc(211)] [15:42:41.535] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) Udemy user failed to login Closing browser
@sidhant-khamankar The captcha won't show at all anymore so there should be no need to solve captcha. As for the error linked please provide some more info on your system please. The error shown seems to be related to a usb device connected to your system. I'll add more logs on Alpha now to help identify the login failure.
@cullzie I have wireless mouse's USB connected. System Info: Windows 10 Home 1909, Intel i5 10300H, Nvidia Geforce 1650Ti, 8GB Ram
I've pushed some more updates to Alpha. There should be more logging now. If running could you please do so with --debug
flag. It will help debug any issues which might arise. Thanks
Tried new patch and when i enter below command same error occurs and still captcha is coming udemy_enroller --browser chrome --debug
DevTools listening on ws://127.0.0.1:3537/devtools/browser/50145672-c054-4116-8da0-23f4365b7b02 [2192:16260:0213/182352.211:ERROR:device_event_log_impl.cc(211)] [18:23:52.211] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F) Udemy user failed to login Closing browser
But when I enter this python udemy_enroller.py and it works๐๐ Thanks๐ค
Some issue with bit.ly links
tutorialbar scraper is running Page: 2 of 743 scraped from tutorialbar.com Got 12 links from https://www.tutorialbar.com in 3.16 seconds Unexpected exception: Malformed url passed in: https://bit.ly/3agCcDq
Also Some issue with discudemy links
Page: 4 of 502 scraped from discudemy.com Got 0 links from https://discudemy.com in 2.42 seconds
While enrolling for some courses following is shown
Checkout failed: Code: 429 Text: {"detail":"Request was throttled. Expected available in 8 seconds."} Checkout failed: Code: 429 Text: {"detail":"Request was throttled. Expected available in 2 seconds."}
Sometimes process gets paused pressing enter resumes it.
Does this works only for Firefox? Because i've tried on Chrome and it give me the captcha too and closes the window
@anevskistefan use the alpha branch.
Ah yes the one installed from pypi is not updated. Which is called like udemy_enroller --debug
To run the one from the alpha branch you need to run udemy_enroller.py
Glad to hear it's working for someone else ๐
@sidhant-khamankar To go through the issues you mentioned the malformed URL is a normal issue with some links from tutorialbar in bit.ly format. We can probably just drop them in the scraping phase now though.
The issue with throttling is to do with enrolling too quickly. We'll just need to retry in these cases. Even with throttling it should be a lot quicker than using the browser ๐
The issue with 0 links on discudemy is because it offers free courses as well which we are not interested in.
@cullzie I tried now with the command python3 udemy_enroller.py --browser firefox --max-pages 500 --debug and this is what i got
And also, when i opened the second time it loads and it's okay but it says timeout on every single link and doesn't subscribe
@anevskistefan it looks like you are not running on the alpha
branch
@cullzie i need to run it like "udemy_enroller.py --browser firefox --max-pages 500? Sorry for misunderstanding, i'm new in this :))
@anevskistefan if you are on the alpha
branch you can run it like udemy_enroller.py
There is no need to specify a browser anymore as it is no longer used.
Just make sure you have installed the new requirements listed in requirements.txt
file: pip install -r requirements.txt
@cullzie I managed to do that man, thank you a lot. It works just fine!
@cullzie Man i started the program and on the 30page it shows me this.
Can we have cookie based login, i.e. add cookies values from already logged in session
Same problem here
@biswajit1602 Saying same problem here in comment is unhelpful. Use the emoji. This is not social media.
@cullzie Man i started the program and on the 30page it shows me this.
@anevskistefan please use another discussion thread to discuss your issue, do not meander this issue. As seen in https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/discussions/236, you tend to jump into random things despite not knowing github workflow. Please educate yourself first, when you comment trivial shits on an issue created for something else, everyone gets an email and it's super annoying because when I get an email for an issue that's breaking functionality, I expect to see something regarding that functionality, not trivial how to post. So please, do not annoy the developers/maintainers.
Can we have cookie based login, i.e. add cookies values from already logged in session
@harmitstar open a new issue, but before that, check the alpha version. We are going through a transition period, we advice you to please be patient with feature request.
I have the same problem on all of my browsers
In my case, it won't work neither, but with slightly different case. It keeps asking for captcha, I solve it manually, but it never accept it. I did it many times so I double checked there is no error in when I solve it. I can't go further captcha, even manually. And yes, I am talking about Udemy Capcha, the google Captcha is not an issue.
@MesterPerfect @xoco70 You need to use the alpha branch
@fakeid30 Ah OK, after installing new requirements and deleting the --browser=chrome param, it seems to be working without a browser. Good improvement !
Tried out the alpha branch. I am getting "Checkout failed" errors for all courses with two different users. Any idea?
Checkout failed: https://www.udemy.com/course/onboarding-employees-learning-development-strategies/
Checkout payload: {'checkout_event': 'Submit', 'shopping_cart': {'items': [{'discountInfo': {'code': 'A2A9A6CE07F81CD1AC7C'}, 'purchasePrice': {'amount': 0, 'currency': 'EUR', 'price_string': 'Free', 'currency_symbol': 'โฌ'}, 'buyableType': 'course', 'buyableId': 3811080, 'buyableContext': {}}], 'is_cart': True}, 'payment_info': {'payment_vendor': 'Free', 'payment_method': 'free-method'}}
In cache: https://www.udemy.com/course/plc-advance-course-data-registers-and-internal-relays/?couponCode=FEB22021
Checkout failed: https://www.udemy.com/course/pic18-microcontroller-step-by-step-guide/
Checkout payload: {'checkout_event': 'Submit', 'shopping_cart': {'items': [{'discountInfo': {'code': 'FEB22021'}, 'purchasePrice': {'amount': 0, 'currency': 'EUR', 'price_string': 'Free', 'currency_symbol': 'โฌ'}, 'buyableType': 'course', 'buyableId': 1975432, 'buyableContext': {}}], 'is_cart': True}, 'payment_info': {'payment_vendor': 'Free', 'payment_method': 'free-method'}}
Checkout failed: https://www.udemy.com/course/the-data-science-course-2020-q2-updated-part-1/
I'm running the alpha branch and getting the following error. Any idea why?
Loading existing course details
Currently enrolled in 0 courses
tutorialbar scraper is running
discudemy scraper is running
Error in get request: Cannot connect to host www.tutorialbar.com:443 ssl:default [No route to host]
Page: 1 of None scraped from tutorialbar.com
Error while running tutorialbar scrapper: 'NoneType' object is not iterable
Error in get request: Cannot connect to host discudemy.com:443 ssl:default [No route to host]
Error while running discudemy scrapper: 'NoneType' object has no attribute 'decode'```
I get the alpha branch and getting getting the following error.
@vincekirkov @willbrewster @vinhvan99 there was a pull request sent last night, please do a git pull on the alpha branch. Then try again, if it does not work, delete the cookie file (.cookie).
you can find it in the root folder.
One more thing, alpha branch is not supported for end usage, there has been massive changes to udemy that they implemented to hinder us, so we are trying to fix this and then we will launch it. Any further query for usage support might go unanswered.
I'm getting "Checkout failed:" Error
The Checkout errors were solved for me after deleting the .cookie file from .udemy_enroller. Thanks!
I also keep getting checkout failed errors. Deleting .cookie does not help.
I also keep getting checkout failed errors. Deleting .cookie does not help.
Try registering a new account (or using an account with not too many courses) and delete the cookie again. This solved it for me.
Thanks for help, but now i get another message:
python udemy_enroller.py Loading existing settings Loading cookies from file Exception in redeem courses: 'NoneType' object is not subscriptable
It appeared after deleting cookies. Before I was getting some html code in the console.
Hi, how do I run alpha branch?
Hi, how do I run alpha branch?
switch repos to alpha branch
git fetch --all
git checkout alpha
install dependency files
pip install -r requirements.txt
run script
python udemy_enroller.py
it should run properly
Still getting the checkout failed errors, even with a brand new account with no courses. Anybody has a fix for that?
Hi, how do I run alpha branch?
- switch repos to alpha branch
git fetch --all
git checkout alpha
- install dependency files
pip install -r requirements.txt
- run script
python udemy_enroller.py
it should run properly
I got error message:
error: pathspec 'alpha' did not match any files known to git
What @abdulalief wrote is correct, if you need a more thorough tutorial here's where you can see what exactly is needed and you can follow along if you so choose. But from personal experience, there is no way this should fail. So I will chalk it up to user error.
https://devconnected.com/how-to-switch-branch-on-git/
@lukepes @jiayz1997
What @abdulalief wrote is correct, if you need a more thorough tutorial here's where you can see what exactly is needed and you can follow along if you so choose. But from personal experience, there is no way this should fail. So I will chalk it up to user error.
https://devconnected.com/how-to-switch-branch-on-git/
@lukepes @jiayz1997
Did I did anything wrong? I still can not run script without browser.
@jiayz1997 you are not the target audience for an alpha branch, please wait for the release of stable.
@cullzie when can we merge alpha to develop and / or develop to stable? Any timeframe?
@fakeid30 We can probably merge now. It works to some degree which is much better than the current develop branch. I haven't seen any huge bugs just different users having different issues. Would be easier if they were in separate bugs instead of under this megathread ๐
@fakeid30 For stable it's the same story as above really. Getting this to master is better than what is currently there
@cullzie Yes that's what I thought. Let's cut a release and rebase alpha to develop and delete alpha?
I'm tired of random issue under this megathread. It's becoming a maintenance nightmare.
@fakeid30 That sounds good to me. Ye I find it hard to understand what the problems actually are under this thread. Closing it and allowing people to create standalone bugs will help everyone
Describe the bug When I am invoking this script, it is taking me to a captcha, but logging in normally is not getting any captcha. When I am seeing the captcha, there is not enough time to solve the problem.
To Reproduce Steps to reproduce the behavior:
Expected behavior The window would hold until the captcha is solved
Screenshots
Desktop (please complete the following information):
Additional context This is the same reason github CI is failing as well.