Closed crawler instance in a finally block
This commit is contained in:
parent
fcd91a9709
commit
fc660e4027
1 changed files with 2 additions and 0 deletions
|
|
@ -82,6 +82,8 @@ async def fetch_page_content(
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error fetching page content: {str(e)}")
|
logger.error(f"Error fetching page content: {str(e)}")
|
||||||
raise
|
raise
|
||||||
|
finally:
|
||||||
|
crawler.close()
|
||||||
|
|
||||||
|
|
||||||
async def fetch_with_tavily(
|
async def fetch_with_tavily(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue