mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-04 03:30:50 +08:00
fixed websocket params
This commit is contained in:
parent
97695dd55b
commit
cc255d488e
@ -1855,7 +1855,10 @@ class CrawlWatcher:
|
||||
"""
|
||||
Establishes WebSocket connection and starts listening for messages.
|
||||
"""
|
||||
async with websockets.connect(self.ws_url, extra_headers={"Authorization": f"Bearer {self.app.api_key}"}) as websocket:
|
||||
async with websockets.connect(
|
||||
self.ws_url,
|
||||
additional_headers=[("Authorization", f"Bearer {self.app.api_key}")]
|
||||
) as websocket:
|
||||
await self._listen(websocket)
|
||||
|
||||
async def _listen(self, websocket) -> None:
|
||||
@ -3231,7 +3234,10 @@ class AsyncCrawlWatcher(CrawlWatcher):
|
||||
"""
|
||||
Establishes async WebSocket connection and starts listening for messages.
|
||||
"""
|
||||
async with websockets.connect(self.ws_url, extra_headers={"Authorization": f"Bearer {self.app.api_key}"}) as websocket:
|
||||
async with websockets.connect(
|
||||
self.ws_url,
|
||||
additional_headers=[("Authorization", f"Bearer {self.app.api_key}")]
|
||||
) as websocket:
|
||||
await self._listen(websocket)
|
||||
|
||||
async def _listen(self, websocket) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user