MCPcopy Create free account
hub / github.com/bcefghj/competitive-intelligence-multi-agent / fetch_page

Function fetch_page

python/src/tools/web_scraper.py:31–36  ·  view source on GitHub ↗

Fetch a page and return its HTML content.

(url: str, timeout: float = 30.0)

Source from the content-addressed store, hash-verified

29
30@retry(stop=stop_after_attempt(3), wait=wait_exponential(min=2, max=30))
31async def fetch_page(url: str, timeout: float = 30.0) -> Optional[str]:
32 """Fetch a page and return its HTML content."""
33 async with httpx.AsyncClient(headers=_HEADERS, follow_redirects=True) as client:
34 resp = await client.get(url, timeout=timeout)
35 resp.raise_for_status()
36 return resp.text
37
38
39def extract_text(html: str) -> str:

Callers 1

detect_changesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected