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!
The code scrapes course links and coupons from tutorialbar.com
In case of any bugs or issues, feel free to ping me on LinkedIn or Twitter
Also, don't forget to Fork & Star the repository if you like it!
And if you are feeling extra-generous today, Buy Me a Coffee on: https://www.buymeacoffee.com/utopiancorps ❤
Or support me on Patreon: https://www.patreon.com/utopiancorps ❤ (One-off donations accepted! 😄)
Video Proof:
- IMPORTANT: Make sure you clear all saved Debit/Credit Card or any other
saved payment info from your Browser & your Udemy account before using the
script!
- Use this ONLY for Educational Purposes! By using this code you agree
that I'm not responsible for any kind of trouble caused by the code.
- Make sure web-scraping is legal in your region.
- This is NOT a hacking script, i.e., it can't enroll you for a specific
course! Instead it finds courses that provide coupon links to make the
transaction free and then LEGALLY enroll you to the course!
Simply run the requirements.py in Python's IDLE Editor. If all the requirements are installed, you are good to go but, in case of errors I've listed the individual requirements which can be installed by running the given commands in the terminal or the command prompt. You can even run pip install requirements.txt in the command prompt but if you are a beginner, I urge you to try either of the above mentioned methods. Or click on the image below to watch a short tutorial:
- Requests module for Python:
- ruamel.yaml for Python:
- BeautifulSoup Web-Scraping Library for Python:
- Selenium Browser Automation Tool for Python:
- Webdriver Manager for Python:
- Required Python version: Python 3.8
- Webdrivers are now automatically installed! Hurray! But here are
some links in case you are using the vanilla script or the Safari
Browser:
- Edge- https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
- Chrome- https://chromedriver.chromium.org/
- Firefox- https://github.com/mozilla/geckodriver/releases
- Safari- https://webkit.org/blog/6900/webdriver-support-in-safari-10/ .etc
- Opera- https://github.com/operasoftware/operachromiumdriver/releases
- Internet Explorer- Wait, who even uses this anymore!?
Note: Make sure that the driver version matches your browser.
Note for Ubuntu/Linux Users: Run these commands in the terminal before installing the previous requirements:sudo apt-get update
sudo apt-get upgrade
sudo apt install python3-pip
pip install requests
pip install ruamel.yaml
pip install beautifulsoup4
pip install selenium
pip install webdriver_manager
- Make sure to install all the requirements above.
- Open settings.yaml file using a text editor like Notepad and insert your Udemy registered email in the email section, your Udemy password in the password section, and the ZIP Code in the zipcode section (if you stay in the United States or any other region where Udemy asks for ZIP Code as Billing Info, else enter a random number).
- Choose the appropriate file for your browser (from the list below) in Python's IDLE Editor:
- Tested and works perfectly:
- Chrome: udemy_enroller_chrome.py
- Chromium: udemy_enroller_chromium.py
- Edge: udemy_enroller_edge.py
- Has issues:
- Firefox: udemy_enroller_firefox.py (issue fixed by a contributor but still requires manual driver installation)
- Untested:
- Opera: udemy_enroller_opera.py
- Experimentation or other Browsers (especially Safari):
- Vanilla (aka the old bot- requires manual driver setup): udemy_enroller_vanilla.py
- Should never be used by anyone with self-respect and dignity 🙃 (and of course has bugs):
- Internet Explorer: udemy_enroller_internet_explorer.py
- Run the chosen script in Python's IDLE Editor.
- The bot starts scraping the course links from the first All Courses page on Tutorial Bar and starts enrolling you to Udemy courses. After it has enrolled you to courses from the first page, it then moves to the next Tutorial Bar page and the cycle continues.
Optional: However, you can change the starting page in the page variable inside the main_function(). (Not recommended, except when you are trying to redeem old coupons, which may or may not be valid at this point of time; But sometimes, by a stroke of luck, the coupons may still work!) - Close the browser window, the web-driver and the Python shell to stop the enrollment process.
Unfortunately no, but let me assure you that you may be lucky enough to get a particular course for free when the instructor posts it's coupon code in order to promote it. Also, over time you would build a library of courses by running the script often and have all the required courses in your collection. In fact, I made this course after completing a Python automation course and selenium, which of course I got for free! :)
The bot retrieves coupon links from Tutorial Bar's list to cut the prices and then uses Selenium's Browser automation features to login and enroll to the courses. Think of it this way: Epic Games & other clients like Steam provide you a handful of games each week, for free; Only in this case, we need a coupon code to make those courses free.
Daily, at least once! If you are using it for the first time, I recommend that you allow it to scrape through all pages on Tutorial Bar (might take a few hours since there are >500 pages on the site). I've painstakingly amassed over 4000 courses in the last four years! And out of those 4000, I've only paid for 4 of these courses:
So, a mere 0.001% of courses are actually paid in my collection! Thankfully, you can get more than what I gathered in 4 years, in a matter of weeks! 🙌🏻
It used to be my daily habit to redeem courses and it was an extremely tedious task that took around 15 minutes, for 10 courses. And then I suddenly got the idea to automate it, after I found the automation course mentioned above. I bet, it will save your precious time too! :)
Relax! This happens when you run the script several times in a short interval of time. Solve the captcha, close the browser and the webdriver, and simply re-run the bot. Easy peasy lemon squeezy! 🍋🙃Since we are heavily dependent on a third-party site to retrieve coupons links, there may be issues when the site is down. Needless to mention the connectivity issues too. If everything is working fine, you can see the courses being retrieved in the Python console/shell, which may take a while.
It is highly recommended to run the script using Python's IDLE IDE.
Pro-tip: Create a batch file, to launch the script instantly, using these
instructions: https://datatofish.com/batch-python-script/
We didn't have "develop" branch before, we've added this now.From now on pull request should be made on "develop" branch.
Take a look at our Roadmap here and help us on what you want or talk to us about your proposed changes.