DocsWebFetch
WebFetch
Give your agents web scraping powers. Fetch, parse, and analyze web pages.
Quick Start
quickstart.py
Usage
Option 1: Import directly
import_direct.py
Option 2: Copy and customize
Terminalbash
import_local.py
Installation
install.py
Low-Level Methods
Direct HTTP and parsing operations
fetch(url)
HTTP GET request, returns raw HTML
fetch.py
strip_tags(html)
Strip HTML tags, returns body text only
strip_tags.py
get_title(html)
Get page title
get_title.py
get_links(html)
Extract all links from HTML
get_links.py
get_emails(html)
Extract email addresses from HTML
get_emails.py
get_social_links(html)
Extract social media links
get_social_links.py
High-Level Methods (LLM-Powered)
AI-powered analysis of web pages
analyze_page(url)
Use LLM to understand what a page/company does
analyze_page.py
get_contact_info(url)
Extract contact information using LLM
get_contact_info.py
Composing Functions
Chain low-level methods together for custom workflows:
compose.py
Research Agent Example
research_agent.py
API Reference
| Method | Type | Description |
|---|---|---|
| fetch(url) | Low-level | HTTP GET, returns raw HTML |
| strip_tags(html) | Low-level | Remove HTML tags, return text |
| get_title(html) | Low-level | Extract page title |
| get_links(html) | Low-level | Extract all links |
| get_emails(html) | Low-level | Extract email addresses |
| get_social_links(html) | Low-level | Extract social media links |
| analyze_page(url) | LLM | AI analysis of what page/company does |
| get_contact_info(url) | LLM | AI extraction of contact info |
Configuration
config.py
Customizing
Need to modify WebFetch's behavior? Copy the source into your project and import from there:
Terminalbash
custom_import.py
ConnectOnion