firecrawl 2.2.0__py3-none-any.whl → 2.4.0__py3-none-any.whl

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/__init__.py CHANGED
@@ -13,7 +13,7 @@ import os
13
13
 
14
14
  from .firecrawl import FirecrawlApp, JsonConfig, ScrapeOptions # noqa
15
15
 
16
- __version__ = "2.2.0"
16
+ __version__ = "2.4.0"
17
17
 
18
18
  # Define the logger for the Firecrawl project
19
19
  logger: logging.Logger = logging.getLogger("firecrawl")
firecrawl/firecrawl.py CHANGED
@@ -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._monitor_job_status(id, headers, poll_interval)
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._monitor_job_status(id, headers, poll_interval)
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']:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firecrawl
3
- Version: 2.2.0
3
+ Version: 2.4.0
4
4
  Summary: Python SDK for Firecrawl API
5
5
  Home-page: https://github.com/mendableai/firecrawl
6
6
  Author: Mendable.ai
@@ -1,12 +1,12 @@
1
- firecrawl/__init__.py,sha256=FlLNQdG6xpLs8ppLhPSF-bLx9L3o_A8gmU2UzAACSv8,2570
2
- firecrawl/firecrawl.py,sha256=wyxYLkEKiW9GO4PKNElewsOJOJzBq_hHIDTl3nd5j94,182693
1
+ firecrawl/__init__.py,sha256=Gg99f51IOBHrpPWOVIXyuSbkZIKHLUw0JPQMU349ABw,2570
2
+ firecrawl/firecrawl.py,sha256=aR6849XXWwsxBXrAIz-EAlVEkXggQyrW0mLGitgpieg,182692
3
3
  firecrawl/__tests__/e2e_withAuth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  firecrawl/__tests__/e2e_withAuth/test.py,sha256=-Fq2vPcMo0iQi4dwsUkkCd931ybDaTxMBnZbRfGdDcA,7931
5
5
  firecrawl/__tests__/v1/e2e_withAuth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  firecrawl/__tests__/v1/e2e_withAuth/test.py,sha256=DcCw-cohtnL-t9XPekUtRoQrgg3UCWu8Ikqudf9ory8,19880
7
7
  tests/test_change_tracking.py,sha256=_IJ5ShLcoj2fHDBaw-nE4I4lHdmDB617ocK_XMHhXps,4177
8
- firecrawl-2.2.0.dist-info/LICENSE,sha256=nPCunEDwjRGHlmjvsiDUyIWbkqqyj3Ej84ntnh0g0zA,1084
9
- firecrawl-2.2.0.dist-info/METADATA,sha256=b4f32c9eyvFDwj11eOUf0KKy1fCsZTKfJFN-eRH_ohA,10583
10
- firecrawl-2.2.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
11
- firecrawl-2.2.0.dist-info/top_level.txt,sha256=8T3jOaSN5mtLghO-R3MQ8KO290gIX8hmfxQmglBPdLE,16
12
- firecrawl-2.2.0.dist-info/RECORD,,
8
+ firecrawl-2.4.0.dist-info/LICENSE,sha256=nPCunEDwjRGHlmjvsiDUyIWbkqqyj3Ej84ntnh0g0zA,1084
9
+ firecrawl-2.4.0.dist-info/METADATA,sha256=f1WKYRlMDmMFkXN9hYqJZsDfXINtiDNQutiW0twRe0Y,10583
10
+ firecrawl-2.4.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
11
+ firecrawl-2.4.0.dist-info/top_level.txt,sha256=8T3jOaSN5mtLghO-R3MQ8KO290gIX8hmfxQmglBPdLE,16
12
+ firecrawl-2.4.0.dist-info/RECORD,,