firecrawl 2.16.0__py3-none-any.whl → 2.16.2__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, AsyncFirecrawlApp, JsonConfig, ScrapeOptions, ChangeTrackingOptions # noqa
15
15
 
16
- __version__ = "2.16.0"
16
+ __version__ = "2.16.2"
17
17
 
18
18
  # Define the logger for the Firecrawl project
19
19
  logger: logging.Logger = logging.getLogger("firecrawl")
firecrawl/firecrawl.py CHANGED
@@ -1372,8 +1372,8 @@ class FirecrawlApp:
1372
1372
  if isinstance(json_options, dict) and "schema" in json_options:
1373
1373
  json_options["schema"] = self._ensure_schema_dict(json_options["schema"])
1374
1374
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
1375
- if actions is not None:
1376
- scrape_params['actions'] = [action.dict(exclude_none=True) for action in actions]
1375
+ if actions:
1376
+ scrape_params['actions'] = [action if isinstance(action, dict) else action.dict(exclude_none=True) for action in actions]
1377
1377
  if agent is not None:
1378
1378
  scrape_params['agent'] = agent.dict(exclude_none=True)
1379
1379
  if max_concurrency is not None:
@@ -1513,8 +1513,8 @@ class FirecrawlApp:
1513
1513
  if isinstance(json_options, dict) and "schema" in json_options:
1514
1514
  json_options["schema"] = self._ensure_schema_dict(json_options["schema"])
1515
1515
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
1516
- if actions is not None:
1517
- scrape_params['actions'] = [action.dict(exclude_none=True) for action in actions]
1516
+ if actions:
1517
+ scrape_params['actions'] = [action if isinstance(action, dict) else action.dict(exclude_none=True) for action in actions]
1518
1518
  if agent is not None:
1519
1519
  scrape_params['agent'] = agent.dict(exclude_none=True)
1520
1520
  if max_concurrency is not None:
@@ -1649,8 +1649,8 @@ class FirecrawlApp:
1649
1649
  if isinstance(json_options, dict) and "schema" in json_options:
1650
1650
  json_options["schema"] = self._ensure_schema_dict(json_options["schema"])
1651
1651
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
1652
- if actions is not None:
1653
- scrape_params['actions'] = [action.dict(exclude_none=True) for action in actions]
1652
+ if actions:
1653
+ scrape_params['actions'] = [action if isinstance(action, dict) else action.dict(exclude_none=True) for action in actions]
1654
1654
  if agent is not None:
1655
1655
  scrape_params['agent'] = agent.dict(exclude_none=True)
1656
1656
  if max_concurrency is not None:
@@ -3074,7 +3074,6 @@ class AsyncFirecrawlApp(FirecrawlApp):
3074
3074
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
3075
3075
  if actions:
3076
3076
  scrape_params['actions'] = [action if isinstance(action, dict) else action.dict(exclude_none=True) for action in actions]
3077
-
3078
3077
  if 'extract' in scrape_params and scrape_params['extract'] and 'schema' in scrape_params['extract']:
3079
3078
  scrape_params['extract']['schema'] = self._ensure_schema_dict(scrape_params['extract']['schema'])
3080
3079
  if 'jsonOptions' in scrape_params and scrape_params['jsonOptions'] and 'schema' in scrape_params['jsonOptions']:
@@ -3199,8 +3198,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
3199
3198
  if isinstance(json_options, dict) and "schema" in json_options:
3200
3199
  json_options["schema"] = self._ensure_schema_dict(json_options["schema"])
3201
3200
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
3202
- if actions is not None:
3203
- scrape_params['actions'] = [action.dict(exclude_none=True) for action in actions]
3201
+
3204
3202
  if agent is not None:
3205
3203
  scrape_params['agent'] = agent.dict(exclude_none=True)
3206
3204
 
@@ -3339,8 +3337,8 @@ class AsyncFirecrawlApp(FirecrawlApp):
3339
3337
  if isinstance(json_options, dict) and "schema" in json_options:
3340
3338
  json_options["schema"] = self._ensure_schema_dict(json_options["schema"])
3341
3339
  scrape_params['jsonOptions'] = json_options if isinstance(json_options, dict) else json_options.dict(exclude_none=True)
3342
- if actions is not None:
3343
- scrape_params['actions'] = [action.dict(exclude_none=True) for action in actions]
3340
+ if actions:
3341
+ scrape_params['actions'] = [action if isinstance(action, dict) else action.dict(exclude_none=True) for action in actions]
3344
3342
  if agent is not None:
3345
3343
  scrape_params['agent'] = agent.dict(exclude_none=True)
3346
3344
  if zero_data_retention is not None:
@@ -3374,7 +3372,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
3374
3372
  except:
3375
3373
  raise Exception(f'Failed to parse Firecrawl response as JSON.')
3376
3374
  else:
3377
- self._handle_error(response, 'start batch scrape job')
3375
+ await self._handle_error(response, 'start batch scrape job')
3378
3376
 
3379
3377
  async def crawl_url(
3380
3378
  self,
@@ -3493,7 +3491,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
3493
3491
  raise Exception(f'Failed to parse Firecrawl response as JSON.')
3494
3492
  return await self._async_monitor_job_status(id, headers, poll_interval)
3495
3493
  else:
3496
- self._handle_error(response, 'start crawl job')
3494
+ await self._handle_error(response, 'start crawl job')
3497
3495
 
3498
3496
 
3499
3497
  async def async_crawl_url(
@@ -3611,7 +3609,7 @@ class AsyncFirecrawlApp(FirecrawlApp):
3611
3609
  except:
3612
3610
  raise Exception(f'Failed to parse Firecrawl response as JSON.')
3613
3611
  else:
3614
- self._handle_error(response, 'start crawl job')
3612
+ await self._handle_error(response, 'start crawl job')
3615
3613
 
3616
3614
  async def check_crawl_status(self, id: str) -> CrawlStatusResponse:
3617
3615
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firecrawl
3
- Version: 2.16.0
3
+ Version: 2.16.2
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=4cUAXE0lf7JbSS7HOrSvFgVAg3A4pDsZami8QkM9pTk,2613
2
- firecrawl/firecrawl.py,sha256=K27kDtIGWVr04DcD4Gh2dHroJ3Wmz1ro_EIsnx82mJw,198523
1
+ firecrawl/__init__.py,sha256=WMYkjsU2CCNa2TAjTxeB_Z_2wAFOkK2Ax4sJNwUHPVU,2613
2
+ firecrawl/firecrawl.py,sha256=oXuCZklh-UufHdIzpGhkxV5E4GhXTWOM6E0ubUDWgAE,198527
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=k9IsEbdTHL9Cu49M4FpnQDEo2rnG6RqwmZAsK_EVJr4,21069
7
7
  tests/test_change_tracking.py,sha256=_IJ5ShLcoj2fHDBaw-nE4I4lHdmDB617ocK_XMHhXps,4177
8
- firecrawl-2.16.0.dist-info/LICENSE,sha256=nPCunEDwjRGHlmjvsiDUyIWbkqqyj3Ej84ntnh0g0zA,1084
9
- firecrawl-2.16.0.dist-info/METADATA,sha256=knj_sJ96n9SvbWLbA9c_OwXgqRk38RS9d20qyzlequ0,7166
10
- firecrawl-2.16.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
11
- firecrawl-2.16.0.dist-info/top_level.txt,sha256=8T3jOaSN5mtLghO-R3MQ8KO290gIX8hmfxQmglBPdLE,16
12
- firecrawl-2.16.0.dist-info/RECORD,,
8
+ firecrawl-2.16.2.dist-info/LICENSE,sha256=nPCunEDwjRGHlmjvsiDUyIWbkqqyj3Ej84ntnh0g0zA,1084
9
+ firecrawl-2.16.2.dist-info/METADATA,sha256=YmN8NqbgHCZFjJRTUNvJV2ltAro2CIK3bIAuvMnHIZU,7166
10
+ firecrawl-2.16.2.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
11
+ firecrawl-2.16.2.dist-info/top_level.txt,sha256=8T3jOaSN5mtLghO-R3MQ8KO290gIX8hmfxQmglBPdLE,16
12
+ firecrawl-2.16.2.dist-info/RECORD,,