A Python scraper that monitors r/udemyfreeebies to detect when "100 Days of Code: The Complete Python Pro Bootcamp by Angela Yu" is posted for free.
Reddit's .json API endpoint is completely dead for unauthenticated requests — it returns a login wall regardless of headers or user-agent spoofing. Even with authentication, it's unreliable and heavily rate-limited.
This scraper uses Reddit's RSS feed (.rss) instead, which:
- Still returns structured post data
- Works with session cookie authentication via
curl_cffi - Is parsed cleanly using
feedparser+BeautifulSoup
⚠️ The RSS feed also requires authentication. You must supply your Reddit session cookies viacookies.json(see setup below).
| File | Purpose |
|---|---|
main.py |
Main scraper — scans latest posts and prints any matches |
one_time.py |
One-time script — finds the megathread and saves all courses to courses.txt |
cookies.json |
Your Reddit session cookies (required — see setup below) |
courses.txt |
Output file written by one_time.py |
requirements.txt |
Python dependencies |
- Python 3.7+
- A Reddit account (free)
- Cookie Editor browser extension
pip install -r requirements.txtOr manually:
pip install curl_cffi feedparser beautifulsoup4Both scripts load cookies.json to authenticate with Reddit. Without valid cookies, the RSS feed returns a login wall.
- Install the Cookie Editor extension (Chrome or Firefox)
- Log in to reddit.com
- Navigate to r/udemyfreeebies
- Click the Cookie Editor extension icon
- Click Export → Export as JSON
- Save the file as
cookies.jsonin the project root, replacing the existing placeholder
⚠️ Cookies expire periodically. If you get a403or empty feed, re-export from Cookie Editor.
Fetches the latest posts from the RSS feed and checks each one against the pattern.
python main.pyOutput Example:
--- Scraper Hit Verification ---
Scraping https://www.reddit.com/r/udemyfreeebies/.rss?limit=10...
- Udemy Free Courses - June 2025
- 100 Days of Code: The Complete Python Pro Bootcamp by Angela Yu
========================================
MATCH FOUND!
Title: 100 Days of Code: The Complete Python Pro Bootcamp by Angela Yu
Link: https://www.udemy.com/course/100-days-of-code/
========================================
Finds the pinned "Udemy Free Courses" megathread, parses all course links from the post body, and saves them to courses.txt.
python one_time.pyOutput is written to courses.txt in markdown format:
# Udemy Free Courses - June 2025
* Course Name [REDEEM OFFER](https://udemy.com/...)
* ...
- Loads
cookies.jsonand injects cookies into acurl_cffisession (impersonating Chrome 120) - Fetches
https://www.reddit.com/r/udemyfreeebies/.rss?limit=10 - Parses the Atom feed with
feedparser - For each entry, strips HTML from the post body using
BeautifulSoup - Runs the regex pattern against the title + body text
- Prints any matches with their Udemy link
- Same cookie + session setup as
main.py - Fetches the RSS feed and finds the entry titled "Udemy Free Courses"
- Parses all
<li>elements from the post HTML - Extracts course titles and Udemy URLs
- Writes everything to
courses.txt
PATTERN = re.compile(
r"(100.*days.*code.*angela.*yu)|" # Course ... Instructor
r"(angela.*yu.*100.*days.*code)|" # Instructor ... Course
r"(100\s*days\s*of\s*code.*python\s*pro\s*bootcamp)", # Full title
re.IGNORECASE
)Matches any of:
"100 Days of Code"+"Angela Yu"in any order"100 Days of Code: The Complete Python Pro Bootcamp"(no instructor needed)
Reddit blocks the standard requests library via TLS fingerprinting. curl_cffi impersonates Chrome 120 at the TLS level, making the request indistinguishable from a real browser.
- URL:
https://www.reddit.com/r/udemyfreeebies/.rss?limit=10 - Format: Atom XML (parsed by
feedparser) - Auth: Session cookies from
cookies.json
| Error | Cause | Fix |
|---|---|---|
403 / login wall |
Cookies missing, expired, or invalid | Re-export cookies.json from Cookie Editor |
429 |
Rate limited by Reddit | Wait and retry |
CRITICAL FAILURE |
Network error or unexpected response | Check internet connection |
| Empty feed / no entries | Cookie issue or subreddit unavailable | Verify cookies are fresh |
Edit PATTERN in main.py or one_time.py:
PATTERN = re.compile(r"your.*course.*name", re.IGNORECASE)limit = 25 # top of main.py- Cookie Expiry — Reddit cookies expire; re-export periodically
- Rate Limiting — ~60 requests/minute
- Manual Execution — No built-in scheduler; run manually or via cron/Task Scheduler
- Periodic auto-monitoring with
schedule - Email or Discord notification on match
- Auto cookie refresh via browser automation
- Track multiple courses simultaneously
| Package | Purpose |
|---|---|
curl_cffi |
HTTP requests with Chrome TLS fingerprint impersonation |
feedparser |
Parses Reddit's Atom RSS feed |
beautifulsoup4 |
Strips HTML from post body content |
For educational purposes. Ensure compliance with Reddit's Terms of Service and Udemy's policies.
Status: ✅ Active — using RSS feed (.json API is dead)