From 7d2efe5acb5595c53323565046564927143370de Mon Sep 17 00:00:00 2001 From: Matt Joyce Date: Thu, 23 May 2024 08:39:19 +1000 Subject: [PATCH] Added request timeouts connection timeout to 5 seconds and the response timeout to 10 PyLint W3101 --- apps/python-sdk/firecrawl/firecrawl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.py index 7612e5d..d986407 100644 --- a/apps/python-sdk/firecrawl/firecrawl.py +++ b/apps/python-sdk/firecrawl/firecrawl.py @@ -73,7 +73,8 @@ class FirecrawlApp: response = requests.post( f'{self.api_url}/v0/scrape', headers=headers, - json=scrape_params + json=scrape_params, + timeout=(5,10) ) if response.status_code == 200: response = response.json() @@ -111,7 +112,8 @@ class FirecrawlApp: response = requests.post( f'{self.api_url}/v0/search', headers=headers, - json=json_data + json=json_data, + timeout=(5,10) ) if response.status_code == 200: response = response.json()