From 759164831daf69106dc39c7b999601e3bb607132 Mon Sep 17 00:00:00 2001 From: lvzhengri <95766782+lvzhengri@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:56:52 +0800 Subject: [PATCH] Update async_webcrawler.py (#337) add @asynccontextmanager --- crawl4ai/async_webcrawler.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crawl4ai/async_webcrawler.py b/crawl4ai/async_webcrawler.py index 2c17602d..9fe4fcc4 100644 --- a/crawl4ai/async_webcrawler.py +++ b/crawl4ai/async_webcrawler.py @@ -132,6 +132,11 @@ class AsyncWebCrawler: # if self.verbose: # print(f"{Fore.GREEN}{self.tag_format('READY')} {self.log_icons['READY']} AsyncWebCrawler initialized{Style.RESET_ALL}") + @asynccontextmanager + async def nullcontext(self): + """异步空上下文管理器""" + yield + async def arun( self, url: str,