Closed ducdat-ptit closed 1 year ago
Hey @ducdat-ptit, Could you please provide the full command you are using to run the tool please? The browser based path should not be triggered unless you specify the --browser flag unless you are running an older version. Using the REST based API is much more stable.
@cullzie I am having the same issue! I launch the CMD on the folder where I downloaded the source files of your udemy enroller and execute udemy_enroller --browser=chrome
But the chrome window immediately shuts down! I receive this error message on CMD:
DevTools listening on ws://127.0.0.1:50748/devtools/browser/4bc533b4-f4d5-4a2b-bc14-a7924726f3eb [6380:8568:1221/181103.676:ERROR:device_event_log_impl.cc(215)] [18:11:03.675] USB: usb_device_handle_win.cc:1045 Failed to read descriptor from node connection: Un dispositivo collegato al sistema non Þ in funzione. (0x1F) [6380:8568:1221/181103.677:ERROR:device_event_log_impl.cc(215)] [18:11:03.677] USB: usb_device_handle_win.cc:1045 Failed to read descriptor from node connection: Un dispositivo collegato al sistema non Þ in funzione. (0x1F) Exception in redeem courses: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="email"]"} (Session info: chrome=108.0.5359.125)
Closing browser
Note: my Windows 11 is in Italian so "Un dispositivo collegato al sistema non in funzione" means a connected device to the system doesn't work (don't know what device it is talking about honestly :D ).
Any solution? Thank you!
Hey @ducdat-ptit, Could you please provide the full command you are using to run the tool please? The browser based path should not be triggered unless you specify the --browser flag unless you are running an older version. Using the REST based API is much more stable.
@cullzie app.log
This is the full command. D:\Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE-master>udemy_enroller --browser=chrome Loading existing settings
[WDM] - ====== WebDriver manager ====== [WDM] - Current google-chrome version is 108.0.5359 [WDM] - Get LATEST chromedriver version for 108.0.5359 google-chrome [WDM] - About to download new driver from https://chromedriver.storage.googleapis.com/108.0.5359.71/chromedriver_win32.zip [WDM] - Driver has been saved in cache [C:\Users\admin.wdm\drivers\chromedriver\win32\108.0.5359.71]
DevTools listening on ws://127.0.0.1:50852/devtools/browser/074d87a3-eb2f-455f-8b5e-54cb8f30e0ce Exception in redeem courses: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="email"]"} (Session info: chrome=108.0.5359.125)
Closing browser
D:\Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE-master>udemy_enroller --browser=chromium Loading existing settings
[WDM] - ====== WebDriver manager ====== [WDM] - Current chromium version is 91.0.4472 [WDM] - Get LATEST chromedriver version for 91.0.4472 chromium [WDM] - About to download new driver from https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_win32.zip [WDM] - Driver has been saved in cache [C:\Users\admin.wdm\drivers\chromedriver\win32\91.0.4472.101]
DevTools listening on ws://127.0.0.1:50893/devtools/browser/07c02dd1-6e1a-46ac-a227-13f127bc057e
Traceback (most recent call last):
File "c:\users\admin\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\admin\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\admin\AppData\Local\Programs\Python\Python38-32\Scripts\udemy_enroller.exe__main.py", line 7, in
D:\Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE-master>udemy_enroller --browser=google-chrome Loading existing settings
[WDM] - ====== WebDriver manager ====== [WDM] - Current google-chrome version is 108.0.5359 [WDM] - Get LATEST chromedriver version for 108.0.5359 google-chrome [WDM] - Driver [C:\Users\admin.wdm\drivers\chromedriver\win32\108.0.5359.71\chromedriver.exe] found in cache
DevTools listening on ws://127.0.0.1:55493/devtools/browser/b2423b9f-fe35-43e0-9bd3-3f8c26238c4a Exception in redeem courses: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="email"]"} (Session info: chrome=108.0.5359.125)
Closing browser
@ducdat-ptit Thanks for the details.
I would recommend using the REST based enrollment from now on. Using udemy_enroller
without the browser option will do this if you are on version 4.1.2 of this library.
The UI based enrollment is very flaky and can change based on many things e.g. speed of internet connection etc.
@ahmedfarrag17 I think this is the same issue you are experiencing: https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/issues/410
@cullzie when I execute udemy_enroller
without specifing the browser, i still receive an error (but it is different from the previous one).
Loading existing settings No cookie available Exception in redeem courses: Unable to get csrf_token
Any way to fix this?
Thanks!
@cullzie when I execute
udemy_enroller
without specifing the browser, i still receive an error (but it is different from the previous one).Loading existing settings No cookie available Exception in redeem courses: Unable to get csrf_token
Any way to fix this?
Thanks!
Same issue. Any suggestions?
@ahmedfarrag17 @frankShih I still am not having this issue so its very hard to debug it :cry: Do you run the scripts very often? Can you still login? (without using the scripts)
Perhaps there is some rate-limiting or something going on here but that is just speculation
Ok I got the error and there was already a PR to fix this issue. (Thanks @Asunnya) I will try to release a version in the next few days.
Ok I got the error and there was already a PR to fix this issue. (Thanks @Asunnya) I will try to release a version in the next few days.
Thanks 🙏🏽
@cullzie hi, I just want to make sure. Have you fixed the issue ? thank you
@cullzie hi, I just want to make sure. Have you fixed the issue ? thank you
Hi there,
https://github.com/aapatre/Automatic-Udemy-Course-Enroller-GET-PAID-UDEMY-COURSES-for-FREE/pull/411
Was the issue that fixed this
Please install the latest master :)
let me know if you see any more issues
@TriRizki @baseplate-admin Latest version of the library (4.1.3) has been merged to master and published to pypi
@baseplate-admin I installed the latest version 4.1.3 and I still receive the same error! the browser window opens and in few seconds it closes automatically. the error:
`Loading existing settings
[WDM] - ====== WebDriver manager ====== [WDM] - Current google-chrome version is 111.0.5563 [WDM] - Get LATEST chromedriver version for 111.0.5563 google-chrome [WDM] - Driver [C:\Users\ahmed.wdm\drivers\chromedriver\win32\111.0.5563.64\chromedriver.exe] found in cache
DevTools listening on ws://127.0.0.1:51612/devtools/browser/16aca066-69e7-4b08-b275-4e7c4a5c7132 Exception in redeem courses: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="email"]"} (Session info: chrome=111.0.5563.64)
Closing browser`
@cullzie hi, I just want to make sure. Have you fixed the issue ? thank you
Hi there,
411
Was the issue that fixed this
Please install the latest master :)
let me know if you see any more issues
Hi! The issue still persists with the newest version for me. Getting the same error:
No cookie available
Exception in redeem courses: Unable to get csrf_token
Thanks!
@ahmedfarrag17 Can you please try running with the CLI option? It is much more stable than browser version
udemy_enroller
@nordflow I am not seeing this issue unfortunately. Are you running using a VPN?
@cullzie I am receiving the same error as @nordflow ! I open CMD on the folder where I downloaded and installed the Udemy Enroller, and executed "udemy_enroller". the error it gives me is
No cookie available Exception in redeem courses: Unable to get csrf_token
If I run udemy_enroller --browser=chrome instead, I receive the error I just typed above.
@ahmedfarrag17 Can you run udemy_enroller --debug
and let me know the system and version details please
(If there are no version details you are not running v4.1.3 yet)
@cullzie Where should the version show up? Looks the same for me:
2023-03-08 20:48:26,867 - udemy_enroller - INFO - cli : Enabled debug logging
2023-03-08 20:48:26,867 - udemy_enroller - INFO - settings : Loading existing settings
2023-03-08 20:48:26,880 - udemy_enroller - INFO - udemy_rest : No cookie available
2023-03-08 20:48:27,320 - udemy_enroller - ERROR - runner : Exception in redeem courses: Unable to get csrf_token
However, I'm running from the newest source code.
@nordflow It should be in the first few lines printed out to the console, before the lines you are seeing. Can you check with pip what version of the script you have installed in that case please? Seems it is not 4.1.3 If you are running directly from the repo could you please sync your branch with master
Hi @cullzie, you were right! I thought I was running the script from my folder. But it was running the installed pip version which wasn't up to date. It is all working fine now. Thanks again!
@cullzie I restarted the PC and re-installed the requirements and now it works!! (probably because the first time it asked me to update pip! so I think it is necessary to restart the PC after updating it, reinstall the requirements again, run and it works). but I noticed only udemy_enroller works! specifying the browser (udemy_enroller --browser=chrome) gives error!
@cullzie thank you so much for your help! now it works!!
@nordflow @ahmedfarrag17 Glad you are both back in business.
Yes the browser version has been neglected for a while now since the CLI version is a lot more stable and less prone to changes. The browser version will likely be removed in future as all functionality is already available in the CLI version
When I apply the command "udemy_enroller", the command returns the following error. Please tell me how to fix the below issue?
** python udemy_enroller.py --browser chrome Loading existing settings
[WDM] - ====== WebDriver manager ====== [WDM] - Current google-chrome version is 108.0.5359 [WDM] - Get LATEST chromedriver version for 108.0.5359 google-chrome [WDM] - Driver [C:\Users\admin.wdm\drivers\chromedriver\win32\108.0.5359.71\chromedriver.exe] found in cache
DevTools listening on ws://127.0.0.1:64921/devtools/browser/ba65e4a7-f83f-4dde-99f5-d4de6aba1d16 Exception in redeem courses: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="email"]"} (Session info: chrome=108.0.5359.96)
Closing browser **