mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-06 08:26:05 +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.
|
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)
|
await self._listen(websocket)
|
||||||
|
|
||||||
async def _listen(self, websocket) -> None:
|
async def _listen(self, websocket) -> None:
|
||||||
@ -3231,7 +3234,10 @@ class AsyncCrawlWatcher(CrawlWatcher):
|
|||||||
"""
|
"""
|
||||||
Establishes async WebSocket connection and starts listening for messages.
|
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)
|
await self._listen(websocket)
|
||||||
|
|
||||||
async def _listen(self, websocket) -> None:
|
async def _listen(self, websocket) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user