Skip to content

API Reference parrot_loaders.web

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_loaders.web

View source

Attribute DEFAULT_UA

Attribute HAS_TRAFILATURA

Class WebDriverPool

Async WebDriver pool for efficient browser management.

Parameter Type Default Description
max_drivers int 3
browser str 'chrome'
**driver_kwargs {}

Method WebDriverPool.get_driver

Get a driver from the pool or create a new one.

get_driver() -> webdriver

Returns: webdriver

Method WebDriverPool.return_driver

Return a driver to the pool after cleaning it.

return_driver(driver: webdriver)

Parameter Type Default Description
driver webdriver

Method WebDriverPool.close_all

Close all drivers in the pool.

close_all()

Class WebLoader

Load web pages and extract HTML + Markdown + structured bits (videos/nav/tables).

Parameter Type Default Description
source_type str 'website'
browser str 'chrome'
timeout int 60
page_load_strategy str 'normal'
user_agent Optional[str] DEFAULT_UA
max_drivers int 3
driver_pool Optional[WebDriverPool] None
content_extraction Literal['auto', 'trafilatura', 'markdown', 'text'] 'auto'
trafilatura_fallback_threshold float 0.1
**kwargs {}

Method WebLoader.open

Initialize resources - called by AbstractLoader's aenter.

open()

Method WebLoader.close

Clean up resources - called by AbstractLoader's aexit.

close()

Method WebLoader.md

Convert BeautifulSoup to Markdown.

md(soup: BeautifulSoup, **options) -> str

Parameter Type Default Description
soup BeautifulSoup
**options {}

Returns: str

Method WebLoader.clean_html

Clean and extract content from HTML.

clean_html(html: str, tags: List[str], objects: List[Dict[str, Dict[str, Any]]] = [], *, parse_videos: bool = True, parse_navs: bool = True, parse_tables: bool = True) -> Tuple[List[str], str, str]

Parameter Type Default Description
html str
tags List[str]
objects List[Dict[str, Dict[str, Any]]] []
parse_videos bool True
parse_navs bool True
parse_tables bool True

Returns: Tuple[List[str], str, str]

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally