Inspiration

The challenge presented a complex multi-step workflow with multiple CAPTCHAs, payment processing, and security layers, the perfect testbed for an autonomous AI agent. Plus, who hasn't fantasized about automating the dropout process at 3 AM during finals week?

What it does

YOLO: You Only Logout Once is an autonomous web automation agent that completes the entire university student dropout process from start to finish:

  • Authenticates through login with netname/password
  • Defeats 3 types of CAPTCHAs:
    • Logo recognition using computer vision (OpenCV)
    • Numeric sequence puzzles (click numbers in order)
  • Handles Two-Factor Authentication by extracting MFA codes from popup windows
  • Processes payments
    • Navigating popup windows
    • Selecting saved payment methods
    • Solving additional CAPTCHAs in the payment flow
  • Drops all enrolled courses automatically
  • Completes the dropout process

All without human intervention. Speedrun time: ~3 minutes

How I built it

Tech Stack:

  • Python - Core automation logic
  • Playwright - Browser automation and web scraping
  • OpenCV - Computer vision for logo CAPTCHA detection
  • NumPy - Image processing and analysis
  • Regex - Pattern matching for MFA codes and sequences

Key Technical Challenges:

  1. Logo CAPTCHA Solver: Used HSV color space analysis and edge detection to identify logos vs solid colors
  2. Sun CAPTCHA Trick: Had to detect the inverse (I waisted a lot of time figuring it out haha)clicking images that are NOT suns required yellow/orange ratio analysis with a threshold
  3. Popup Window Handling: Payment processing opened in a new window context requiring proper Playwright popup management
  4. Dynamic Scrolling: Multiple instances where content wasn't visible without programmatic scrolling
  5. State Management: Tracking workflow progress across 9+ distinct steps

Challenges I ran into

  • The Sun CAPTCHA Betrayal: Spent hours perfecting sun detection with HSV color analysis only to discover the instructions wanted us to click NON-sun images. Classic misdirection! 🌞
  • Popup Hell: The payment flow opened in a popup window, which required completely different context handling in Playwright
  • CAPTCHA Evolution: Each CAPTCHA type required a different solving strategy (regex for numeric sequences, computer vision for logos, color analysis for images)
  • Timing Issues: Finding the perfect balance of wait times between actions to ensure page loads completed without wasting time
  • Scroll Mechanics: Buttons and forms were often off-screen, requiring strategic scrolling at precise moments

Accomplishments that I am proud of

Built a fully autonomous agent that completes a 20+ step workflow without human intervention
Defeated 3 different CAPTCHA types using custom algorithms
Successfully processed payment in a popup window (harder than it sounds!)
Computer vision implementation that actually works in production
The agent has a 100% success rate when CAPTCHAs are solvable
Created something genuinely useful (and slightly chaotic)

What I learned

  • Computer vision is simultaneously easier and harder than expected
  • Web automation requires thinking like the website instead of fighting it
  • Sometimes the best solution is inverting your logic (looking at you, sun CAPTCHA)
  • Popup windows are the final boss of web scraping
  • Error handling and screenshots are your best friends when debugging
  • The University bureaucracy can actually be beaten with code

What's next for YOLO: You Only Logout Once

  • Generalize the agent to work on other university portals
  • Add machine learning to improve CAPTCHA solving accuracy
  • Create a GUI for non-technical users
  • Support for more CAPTCHA types (reCAPTCHA v3, hCaptcha, etc.)
  • Parallel processing for handling multiple accounts
  • Docker containerization for easy deployment
  • Maybe build the opposite: an automated enrollment agent?

Built With

  • ai
  • browser-automation
  • computer-vision
  • imageprocessing
  • numpy
  • opencv
  • playwright
  • python
  • web-automation
Share this project:

Updates