extract_resources
Extract resources (images, links, media, documents) from a specific DOM container on a web page by providing a CSS selector or element reference.
Instructions
Extract resources (images, links, media, documents) from a specific DOM container. Use a CSS selector or element ref from snapshot to scope extraction to a particular section of the page. This is useful for extracting all images from a specific post, all links from a table, etc.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | Yes | Tab ID from create_tab | |
| userId | No | User ID override (default: tracked tab userId) | |
| selector | No | CSS selector for target container (e.g., '.message:nth-child(3)') | |
| ref | No | Element ref from snapshot (e.g., 'e12'). Either selector or ref required. | |
| types | No | Resource types to extract: 'images', 'links', 'media', 'documents' (singular forms also accepted). Default: all. | |
| extensions | No | Filter by file extensions: ['pdf', 'jpg', 'png'] | |
| resolveBlobs | No | Resolve blob: URLs to data: URIs | |
| triggerLazyLoad | No | Scroll to trigger lazy-loaded images before extraction | |
| maxDepth | No | Max nesting depth for container traversal |