Skip to main content

Overview

Genie Helper uses Stagehand (Playwright + vision LLM) to scrape creator profiles from OnlyFans, Fansly, and other platforms. The scraper supports cookie-based authentication, username/password login, and Twitter/X OAuth flows. Operation: scrape_profile (media-worker)
Browser: Local Playwright (headless Chrome)
Vision LLM: ollama/qwen-2.5 for page understanding

Architecture

Scraping Flow

Authentication Methods

The scraper supports 3 authentication types (stored in platform_connections.auth_type): Flow: User logs in via browser extension → Extension captures cookies → Scraper injects cookies on next run Pros:
  • Most reliable (no credential validation)
  • Works with 2FA, Google SSO, magic links
  • Bypasses bot detection
Cons:
  • Requires manual login once every 30-90 days (cookie expiry)
Dashboard Setup: Select “Cookie-only (most reliable)” during platform connection

2. Email/Password

Flow: Scraper navigates to login page → Fills email + password fields → Clicks sign-in button Pros:
  • Fully automated (no user interaction)
  • Works for platforms without 2FA
Cons:
  • May trigger CAPTCHA or bot detection
  • Fails if 2FA is enabled
Implementation: media-worker/index.js:731-739

3. Twitter/X OAuth

Flow: Scraper clicks “Sign in with X” → Fills X credentials → OnlyFans/Fansly redirects back Supported platforms: OnlyFans, Fansly
Credentials: x_username + x_password (separate from platform credentials)
Implementation: media-worker/index.js:708-728

HITL (Human-in-the-Loop) System

HITL is triggered when:
  • No cookies available in platform_sessions
  • No credentials stored (auth_type: cookie_only)
  • Login fails (CAPTCHA, 2FA, or expired cookies)

Flow

  1. Scraper creates hitl_sessions record:
  2. Dashboard shows yellow banner:
  3. User clicks “Download Extension” → Installs from public/extension/
  4. User navigates to platform and logs in normally
  5. Extension captures cookies → Sends to /api/credentials/store-platform-session
  6. Backend encrypts cookies → Stores in platform_sessions.encrypted_cookies
  7. Dashboard shows green checkmark → User clicks “Let’s Go” again
  8. Scraper injects cookies → Bypass login wall → Success
Implementation: dashboard/src/pages/Dashboard/index.jsx (banner) + browser extension

Data Extraction

Profile Stats

Extracted fields:
  • follower_count — Total subscribers/followers
  • post_count — Total posts published
  • subscription_price — Monthly price (e.g., “$9.99” or “Free”)
  • bio_text — Profile biography
LLM Instruction: media-worker/index.js:762-770

Recent Posts

Extracted per post:
  • caption — Post text (max 500 chars)
  • posted_at — Date string (e.g., “Jan 15” or “2 days ago”)
  • likes_count — Like count (0 if not shown)
  • comments_count — Comment count (0 if not shown)
Limit: 30 most recent posts
Storage: scraped_media collection
Implementation: media-worker/index.js:776-800

Supported Platforms

Platform URLs: media-worker/index.js:641-645

Scrape Status States

Stored in platform_connections.scrape_status: Status Updates: media-worker/index.js:629,754,811,849

Browser Extension

Path: public/extension/ (Firefox + Chrome manifest)
Size: ~15KB (no external dependencies)

Features

  • Captures cookies on command (user clicks extension icon)
  • Encrypts cookies client-side (AES-256-GCM)
  • Sends to /api/credentials/store-platform-session
  • Auto-detects platform from current URL
  • Works on all 18 supported platforms

Installation

Firefox:
  1. Download extension.zip from Dashboard
  2. Open about:debugging#/runtime/this-firefox
  3. Click “Load Temporary Add-on”
  4. Select manifest.json
Chrome:
  1. Download extension.zip
  2. Open chrome://extensions
  3. Enable “Developer mode”
  4. Click “Load unpacked” → Select extension folder
Download Link: Dashboard → Platforms → “Download Browser Extension”

Metadata Stripping

All scraped images are auto-stripped of EXIF/GPS metadata before upload to Directus. Implementation: media-worker/index.js:817-835

Logs & Debugging

Common Issues