Remove inline base64 images from webpages read with Firecrawl

This commit is contained in:
Debanjum
2025-05-02 14:06:24 -06:00
parent 559b323475
commit 5b5efe463d

View File

@@ -499,7 +499,7 @@ async def read_webpage_with_jina(web_url: str, api_key: str, api_url: str) -> st
async def read_webpage_with_firecrawl(web_url: str, api_key: str, api_url: str) -> str:
firecrawl_api_url = f"{api_url}/v1/scrape"
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {api_key}"}
params = {"url": web_url, "formats": ["markdown"], "excludeTags": ["script", ".ad"]}
params = {"url": web_url, "formats": ["markdown"], "excludeTags": ["script", ".ad"], "removeBase64Images": True}
async with aiohttp.ClientSession() as session:
async with session.post(firecrawl_api_url, json=params, headers=headers) as response: