A Hermes skill + standalone toolkit for extracting clean, structured text from SCORM e-learning modules using Chrome DevTools Protocol (CDP). Bypasses bot detection, handles multiple SCORM engines, and outputs RAG-ready markdown.
Corporate LMS platforms (Moodle, Totara, etc.) host SCORM training modules behind SSO and bot protection. Standard HTTP scrapers fail. This tool uses your already-authenticated Chrome session via CDP to:
- Detect which SCORM engine is running (Articulate Storyline, Lectora, DominKnow)
- Navigate through all slides automatically (Previous/Next, sidebar, or preloaded DOM)
- Extract clean text per slide with aggressive UI artifact filtering
- Output a single markdown file ready for RAG indexing, note-taking, or study
Privacy-first: You provide your own SCORM URLs and authenticate in your own browser. The tool never ships with proprietary content, credentials, or LMS-specific data.
# 1. Start Chrome with remote debugging
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug-profile
# 2. Log into your LMS in that Chrome window
# 3. Extract a SCORM module
python3 scripts/cdp_scorm_extractor.py \
--lms-url "https://your-lms.com" \
--scorm-view-id "12345" \
--output "training_content.md"Output:
# SCORM Module: Your Role as a Barista
## Slide 1
Welcome to the training module. In this course, you will learn...
## Slide 2
### Key Responsibilities
- Greeting customers warmly
- Taking accurate orders
- Preparing beverages to standard
---| Engine | Detection | Extraction Method |
|---|---|---|
| Articulate Storyline | SVG <text>/<tspan> elements, aria-label="next" |
Navigate via NEXT button, extract SVG text |
| Lectora | Dynamic HTML, courseStructure.js |
body.innerText with artifact filtering |
| DominKnow | courseStructure.js JSON structure |
Parse JSON text fields (meta, txt, description) |
| Image-based | No DOM text, only button labels | Screenshot + OCR fallback (pytesseract) |
- Python 3.10+
- Playwright:
pip3 install playwright && playwright install chromium - Chrome/Edge/Chromium with remote debugging enabled
- (Optional)
pytesseractfor OCR fallback:pip3 install pytesseract pillow
Copy or symlink the skill directory into your Hermes skills folder:
cp -r skills/scorm-extractor ~/.hermes/skills/Then use it via slash command:
/scorm-extractor https://demo-lms.com/mod/scorm/view.php?id=123
git clone https://github.com/minutechreview/hermes-scorm-extractor.git
cd hermes-scorm-extractor
pip3 install -r requirements.txtfrom scripts.cdp_scorm_extractor import extract_scorm_module
slides = extract_scorm_module(
cdp_url="http://127.0.0.1:9222",
lms_base_url="https://your-lms.com",
scorm_view_id="12345",
output_path="output.md"
)If a SCORM is already completed, it may open in "Review mode" on the last slide. The extractor automatically attempts backward navigation to reach slide 1, then extracts forward. If buttons are CSS-disabled, it uses force=True clicks.
For image-based SCORMs where no text exists in the DOM:
from scripts.cdp_scorm_extractor import extract_with_ocr
slides = extract_with_ocr(
cdp_url="http://127.0.0.1:9222",
popup_url="https://your-lms.com/pluginfile.php/.../index.html",
output_path="output.md"
)Your LMS (SSO/Cloudflare protected)
|
[Your Chrome] <-- you log in here manually
|
[CDP Port 9222]
|
[Playwright script] <-- connects over CDP, piggybacks auth
|
[SCORM popup / iframe] <-- launches manually or via JS
|
[Slide navigation loop] <-- clicks NEXT / Previous / sidebar
|
[DOM extraction + artifact filtering]
|
[Clean Markdown output]
Why CDP? Corporate LMS platforms often block headless browsers via Cloudflare. CDP connects to your real Chrome instance with your real authenticated session, completely bypassing bot detection.
| In this repo (public) | You provide (private) |
|---|---|
| Generic CDP connection code | Your LMS login URL |
| Engine detection heuristics | Your SCORM module links |
| Artifact filtering rules | Your login credentials |
| Navigation loop patterns | Actual training content |
| OCR fallback logic | Internal organization data |
To test without accessing a private LMS, you can use public Articulate Storyline demos:
- Find a public Storyline sample (Articulate's website offers free samples)
- Host the exported SCORM package on any static file server
- Point the extractor at the
index.htmlorstory.htmlURL
The engine detection and SVG text extraction will work the same way.
PRs welcome. Please keep all proprietary URLs, credentials, and organization-specific content out of the repo.
MIT