firecrawl 2.2.0__tar.gz → 2.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of firecrawl might be problematic. Click here for more details.
- {firecrawl-2.2.0 → firecrawl-2.4.0}/PKG-INFO +1 -1
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/__init__.py +1 -1
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/firecrawl.py +6 -11
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl.egg-info/PKG-INFO +1 -1
- {firecrawl-2.2.0 → firecrawl-2.4.0}/LICENSE +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/README.md +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/__tests__/e2e_withAuth/__init__.py +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/__tests__/e2e_withAuth/test.py +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/__tests__/v1/e2e_withAuth/__init__.py +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl/__tests__/v1/e2e_withAuth/test.py +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl.egg-info/SOURCES.txt +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl.egg-info/dependency_links.txt +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl.egg-info/requires.txt +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/firecrawl.egg-info/top_level.txt +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/pyproject.toml +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/setup.cfg +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/setup.py +0 -0
- {firecrawl-2.2.0 → firecrawl-2.4.0}/tests/test_change_tracking.py +0 -0
|
@@ -304,6 +304,9 @@ class ExtractParams(pydantic.BaseModel):
|
|
|
304
304
|
|
|
305
305
|
class ExtractResponse(pydantic.BaseModel, Generic[T]):
|
|
306
306
|
"""Response from extract operations."""
|
|
307
|
+
id: Optional[str] = None
|
|
308
|
+
status: Optional[Literal["processing", "completed", "failed"]] = None
|
|
309
|
+
expiresAt: Optional[datetime] = None
|
|
307
310
|
success: bool = True
|
|
308
311
|
data: Optional[T] = None
|
|
309
312
|
error: Optional[str] = None
|
|
@@ -412,14 +415,6 @@ class ExtractParams(pydantic.BaseModel):
|
|
|
412
415
|
show_sources: Optional[bool] = False
|
|
413
416
|
agent: Optional[Dict[str, Any]] = None
|
|
414
417
|
|
|
415
|
-
class ExtractResponse(pydantic.BaseModel, Generic[T]):
|
|
416
|
-
"""
|
|
417
|
-
Response from the extract operation.
|
|
418
|
-
"""
|
|
419
|
-
success: bool
|
|
420
|
-
data: Optional[T] = None
|
|
421
|
-
error: Optional[str] = None
|
|
422
|
-
|
|
423
418
|
class FirecrawlApp:
|
|
424
419
|
def __init__(self, api_key: Optional[str] = None, api_url: Optional[str] = None) -> None:
|
|
425
420
|
"""
|
|
@@ -3022,7 +3017,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
|
|
|
3022
3017
|
id = response.get('id')
|
|
3023
3018
|
except:
|
|
3024
3019
|
raise Exception(f'Failed to parse Firecrawl response as JSON.')
|
|
3025
|
-
return self.
|
|
3020
|
+
return await self._async_monitor_job_status(id, headers, poll_interval)
|
|
3026
3021
|
else:
|
|
3027
3022
|
self._handle_error(response, 'start batch scrape job')
|
|
3028
3023
|
|
|
@@ -3259,7 +3254,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
|
|
|
3259
3254
|
id = response.get('id')
|
|
3260
3255
|
except:
|
|
3261
3256
|
raise Exception(f'Failed to parse Firecrawl response as JSON.')
|
|
3262
|
-
return self.
|
|
3257
|
+
return await self._async_monitor_job_status(id, headers, poll_interval)
|
|
3263
3258
|
else:
|
|
3264
3259
|
self._handle_error(response, 'start crawl job')
|
|
3265
3260
|
|
|
@@ -3472,7 +3467,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
|
|
|
3472
3467
|
data.extend(next_data.get('data', []))
|
|
3473
3468
|
status_data = next_data
|
|
3474
3469
|
status_data['data'] = data
|
|
3475
|
-
return status_data
|
|
3470
|
+
return CrawlStatusResponse(**status_data)
|
|
3476
3471
|
else:
|
|
3477
3472
|
raise Exception('Job completed but no data was returned')
|
|
3478
3473
|
elif status_data.get('status') in ['active', 'paused', 'pending', 'queued', 'waiting', 'scraping']:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|