Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

Use truthiness check for 'success' key in API response

Matt Joyce106c18d11f85
diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.py
index 62db7a290..9e3011cdd 100644
--- a/apps/python-sdk/firecrawl/firecrawl.py
+++ b/apps/python-sdk/firecrawl/firecrawl.py
@@ -117,7 +117,7 @@ class FirecrawlApp:
)
if response.status_code == 200:
response = response.json()
- if response['success'] == True:
+ if response['success']:
return response['data']
else:
raise Exception(f'Failed to search. Error: {response["error"]}')