Skip to content

Commit f958e54

Browse files
committed
add dep
1 parent b7b4ffb commit f958e54

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ dependencies = [
2626
"pydantic>=2.0.0",
2727
"jsonschema>=4.0.0",
2828
"requests>=2.31.0", # For server-side API calls
29+
"aiohttp>=3.9.0", # For async API calls
2930
"playwright-stealth>=1.0.6", # Bot evasion and stealth mode
3031
"markdownify>=0.11.6", # Enhanced HTML to Markdown conversion
3132
]

sentience/snapshot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import time
99
from typing import Any, Optional
1010

11-
import aiohttp
1211
import requests
1312

1413
from .browser import AsyncSentienceBrowser, SentienceBrowser
@@ -468,6 +467,9 @@ async def _snapshot_via_api_async(
468467
}
469468

470469
try:
470+
# Lazy import aiohttp - only needed for async API calls
471+
import aiohttp
472+
471473
async with aiohttp.ClientSession() as session:
472474
async with session.post(
473475
f"{browser.api_url}/v1/snapshot",

0 commit comments

Comments
 (0)