0

Use truthiness check for 'success' key in API response

PyLint C0121
This commit is contained in:
Matt Joyce 2024-05-23 08:57:53 +10:00
parent 5c21aed9c7
commit 106c18d11f

View File

@ -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"]}')