fetch-page
Extracts HTML content from a specified URL and converts it to Markdown. Optional CSS selector allows targeting specific page sections for conversion, simplifying web content extraction and formatting.
Instructions
Fetches the HTML content of a given URL. Optionally, it can select a specific part of the HTML using a CSS selector and convert only that part (or the whole body if no selector is provided) to Markdown format. Returns the resulting Markdown text.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
selector | No | Optional CSS selector (e.g., '#main-content', '.article-body'). If provided, only the HTML content within the first matching element will be converted to Markdown. If omitted or if the selector doesn't match, the content of the 'body' tag will be used. | |
url | Yes | The fully qualified URL of the web page to fetch. Must be a valid HTTP or HTTPS URL. |