extract_links
Parse HTML to categorize all links by type—anchors, forms, scripts, images, and CSS—and resolve relative URLs with an optional base URL. Build a crawl tree from a page response without manually searching source.
Instructions
Extract all links (anchors, forms, scripts, images) from HTML. Useful for building a crawl tree without manually grep'ing the response body. html: HTML string base_url: optional base URL for resolving relative links only_same_origin: if True and base_url given, only return links to same host Returns: lists of links by category (anchors, forms, scripts, images, css)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| base_url | No | ||
| only_same_origin | No |