Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Fetch any URL via Chrome CDP and convert the rendered page to clean markdown with YouTube transcript support.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/adapters.md
1# Adapters & Media23Read when choosing an adapter, handling media, or answering adapter-specific questions.45## Built-in Adapters67| Adapter | URLs | Key Features |8|---------|------|-------------|9| `x` | x.com, twitter.com | Tweets, threads, X Articles, media, login detection |10| `youtube` | youtube.com, youtu.be | Transcript/captions, chapters, cover image, metadata |11| `hn` | news.ycombinator.com | Threaded comments, story metadata, nested replies |12| `generic` | Any URL (fallback) | Defuddle extraction, Readability fallback, auto-scroll, network idle detection |1314Adapter is auto-selected based on URL. Override with `--adapter <name>`.1516### YouTube1718- Extracts transcripts/captions when available19- Transcript format: `[MM:SS] Text segment` with chapter headings20- Availability depends on YouTube exposing a caption track; videos with captions disabled or restricted playback may produce description-only output21- Use `--wait-for force` if the page needs time to finish loading player metadata2223### X/Twitter2425- Extracts single tweets, threads, and X Articles26- Auto-detects login state; if logged out and content requires auth, JSON output shows `"status": "needs_interaction"`27- Use `--wait-for interaction` for login-protected content2829### Hacker News3031- Parses threaded comments with proper nesting and reply hierarchy32- Includes story metadata (title, URL, author, score, comment count)33- Shows comment deletion/dead status3435## Media Download Workflow3637Driven by `download_media` in EXTEND.md:3839| Setting | Behavior |40|---------|----------|41| `1` (always) | Run CLI with `--download-media --output <path>` |42| `0` (never) | Run CLI with `--output <path>` (no media download) |43| `ask` (default) | Follow the ask-each-time flow below |4445### Ask-Each-Time Flow46471. Run the CLI **without** `--download-media` with `--output <path>` → markdown saved482. Check the saved markdown for remote media URLs (`https://` in image/video links)493. **If no remote media found** → done, no prompt needed504. **If remote media found** → ask via `AskUserQuestion`:51- header: "Media", question: "Download N images/videos to local files?"52- "Yes" — Download to local directories53- "No" — Keep remote URLs545. If the user confirms → run the CLI **again** with `--download-media --output <same-path>` (overwrites markdown with localized links)5556### Media Layout5758When `--download-media` is enabled:5960- Images → `imgs/` next to the output file (or `--media-dir`)61- Videos → `videos/` next to the output file (or `--media-dir`)62- Markdown media links are rewritten to local relative paths6364## Output Format6566Markdown to stdout (or file with `--output`).6768JSON output (`--format json`) returns structured data:6970- `adapter` — which adapter handled the URL71- `status` — `"ok"` or `"needs_interaction"`72- `login` — login state detection (`logged_in`, `logged_out`, `unknown`)73- `interaction` — interaction gate details (kind, provider, prompt)74- `document` — structured content (url, title, author, publishedAt, content blocks, metadata)75- `media` — collected media assets with url, kind, role76- `markdown` — converted markdown text77- `downloads` — media download results (when `--download-media` used)78