Skip to content

API Reference parrot_tools.scraping.url_utils

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

parrot_tools.scraping.url_utils

View source

URL normalization utilities for the CrawlEngine.

Provides consistent URL normalization for deduplication across crawl sessions. All discovered URLs pass through normalize_url() before being added to the visited set or frontier queue.

Function normalize_url

Normalize a URL for deduplication.

normalize_url(url: str, base: str = '') -> Optional[str]

Parameter Type Default Description
url str The URL to normalize (absolute or relative).
base str '' Base URL used to resolve relative references.

Returns: Optional[str] — The normalized URL string, or None if the URL should be discarded (empty, malformed, or non-HTTP scheme).

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