A multi-provider Udemy course enroller that scrapes coupon sites, resolves Udemy coupon URLs, and automatically enrolls you in free courses using your Udemy cookies.
- 🔌 Multi-Provider Support — 12 providers: ScrollCoupons, Korshub, CourseJoiner, CouponScorpion, UdemyXpert, CouponAmi, Courson, FreebiesGlobal, UdemyFreebies, RealDiscount, FreeWebCart, InfoGNU
- 🚀 Automatic Enrollment — Resolves coupon URLs and attempts enrollment via Udemy checkout/GraphQL
- 🔄 Smart Retries — Exponential backoff on transient failures and Udemy throttling (HTTP 429)
- 🍪 Cookie-Based Auth — Supports
cookies.jsonandcookies.txtexport formats - 📊 Progress Tracking — Real-time progress bars, enrollment counts, and execution timing
- 💾 CSV Logging — Saves enrolled courses to
enrolled_courses.csv - 🐛 Debug Mode — Saves enrollment probe responses for troubleshooting
| Tool | Purpose |
|---|---|
| Python 3.10+ | Runtime |
| curl_cffi | HTTP client with TLS fingerprinting |
| BeautifulSoup4 | HTML parsing |
| lxml | Fast HTML/XML parser (optional) |
Udemy/
├── main.py # Entrypoint
├── cookie/
│ └── cookies.txt # Udemy cookies (not in git)
├── providers/ # Provider implementations
│ ├── __init__.py
│ ├── base_provider.py
│ ├── scrollcoupons_provider.py
│ ├── korshub_provider.py
│ ├── coursejoiner_provider.py
│ ├── couponscorpion_provider.py
│ ├── udemyxpert_provider.py
│ ├── couponami_provider.py
│ ├── courson_provider.py
│ ├── freebiesglobal_provider.py
│ ├── udemyfreebies_provider.py
│ ├── realdiscount_provider.py
│ ├── freewebcart_provider.py
│ └── infognu_provider.py
├── helpers/
│ ├── udemy_helpers.py # Udemy API, enrollment, cookie loading
│ └── session.py # curl_cffi session factory with retries
The bot requires valid Udemy session cookies to enroll in courses.
- Install the Export Cookies TXT extension
- Log in to udemy.com
- Click the extension icon and export cookies to a
.txtfile - Ensure only
udemy.comcookies are included - Save the file as
cookie/cookies.txtin the project directory, or set theCOOKIE_FILEenvironment variable to point to it
| Format | Description |
|---|---|
cookies.txt (Netscape) |
Recommended for Firefox export |
cookies.json |
JSON object or array of cookie objects |
pip install -r requirements.txt# Interactive provider selection
python main.py
# Specific provider
PROVIDER=scrollcoupons python main.py
# Multiple providers
PROVIDERS=scrollcoupons,korshub,coursejoiner,freewebcart,infognu python main.py| Variable | Default | Description |
|---|---|---|
PROVIDER |
scrollcoupons |
Single provider name |
PROVIDERS |
— | Comma-separated provider names |
COOKIE_FILE |
cookie/cookies.txt |
Path to cookie file |
CURL_IMPERSONATE |
firefox |
Browser impersonation (chrome, firefox) |
SAVE_ENROLLMENT_DEBUG |
true |
Save enrollment probe responses |
================================================================================
Provider: scrollcoupons (https://scrollcoupons.com/store/udemy/100-off/1)
================================================================================
Processing provider: scrollcoupons at page 1 in progress...
[001/015] Processing course: https://scrollcoupons.com/...
HTTP Status: 200
Course URL: https://www.udemy.com/course/...
Course ID: 1234567
Coupon Code: AUGUST2026
Coupon Status: Valid
Paid Course: True
Price Amount: $ 0.0
Price Currency: USD
Price Discount: 100%
Course Enrolled: True
Enrollment Date/Time: 2025-12-29 12:45:57+03:00
------------------------------------------------------------
Summary:
Page: 1
Total processed: 15
Already enrolled: 3
Newly enrolled: 7
Not enrolled: 5
Skipped because is_paid=False: 2
Failed due to missing coupon code: 1
Failed due to page fetch failure: 0
Execution time: 124.53 seconds
If you find this project helpful, please consider giving it a ⭐ star or forking it to contribute. Your support helps keep the project alive and visible to others.
This project is provided for educational purposes only. The author is not liable for any damages, account restrictions, or other consequences arising from the use or misuse of this tool. Use at your own risk.
MIT