How akhilkammila/leetcode-screenshotter works
This repository collects LeetCode problem and editorial screenshots, with editorial code also kept as a content collection. The capture workflow uses a runner to select records, wraps screenshotters for retries and diagnostics, then uses Selenium-backed capture logic to load a page, measure its content, and save an image. A separate parser gathers editorial links from the problem listing. The source excerpts show the capture and parser details; the README documents the editorial and premium-problem scope, but not all data or output paths.
Main entry points: problem_screenshotter.py Problem capture · editorial_screenshotter.py Editorial capture · runner.py Capture runner · editorial_scraper.py Editorial scraper
Components 15
Problem collection
- Editorial scraper
problem-data-parser/editorial_scraper.py - Parser browser base
problem-data-parser/selenium_base.py - Parser locators
problem-data-parser/locators.py
Screenshot capture
- Capture runner
screenshotter/runner.py - Debug wrapper
screenshotter/debug_wrapper.py - Problem capture
screenshotter/problem_screenshotter.py - Editorial capture
screenshotter/editorial_screenshotter.py
Browser support
- Browser base
screenshotter/selenium_base.py - Page locators
screenshotter/locators.py
Saved content
- Premium screenshots
- Editorial screenshots
- Editorial code
editorial_code
Other components
- Operator
- LeetCode
- Selenium WebDriver
Connections 18
- Editorial scraper → Parser browser base: inherits
problem-data-parser/editorial_scraper.py - Editorial scraper → Parser locators: uses selectors
problem-data-parser/editorial_scraper.py - Editorial scraper → LeetCode: reads listing
problem-data-parser/editorial_scraper.py - Operator → Capture runner: starts capture
- Capture runner → Problem capture: dispatches
screenshotter/runner.py - Capture runner → Editorial capture: dispatches
screenshotter/runner.py - Capture runner → Debug wrapper: wraps capture
screenshotter/runner.py - Debug wrapper → Problem capture: delegates calls
- Debug wrapper → Editorial capture: delegates calls
- Problem capture → Browser base: inherits
screenshotter/problem_screenshotter.py - Editorial capture → Browser base: inherits
screenshotter/editorial_screenshotter.py - Problem capture → Page locators: uses selectors
screenshotter/problem_screenshotter.py - Editorial capture → Page locators: uses selectors
screenshotter/editorial_screenshotter.py - Browser base → Selenium WebDriver: drives browser
screenshotter/selenium_base.py - Problem capture → LeetCode: loads problem pages
screenshotter/problem_screenshotter.py - Editorial capture → LeetCode: loads editorial pages
screenshotter/editorial_screenshotter.py - Problem capture → Premium screenshots: saves screenshots
screenshotter/problem_screenshotter.py - Editorial capture → Editorial screenshots: saves screenshots
screenshotter/editorial_screenshotter.py