firecrawl 1.6.0__tar.gz → 1.6.1__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-1.6.0 → firecrawl-1.6.1}/PKG-INFO +1 -1
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/__init__.py +1 -1
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/firecrawl.py +6 -9
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl.egg-info/PKG-INFO +1 -1
- {firecrawl-1.6.0 → firecrawl-1.6.1}/LICENSE +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/README.md +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/__tests__/e2e_withAuth/__init__.py +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/__tests__/e2e_withAuth/test.py +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/__tests__/v1/e2e_withAuth/__init__.py +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl/__tests__/v1/e2e_withAuth/test.py +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl.egg-info/SOURCES.txt +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl.egg-info/dependency_links.txt +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl.egg-info/requires.txt +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/firecrawl.egg-info/top_level.txt +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/pyproject.toml +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/setup.cfg +0 -0
- {firecrawl-1.6.0 → firecrawl-1.6.1}/setup.py +0 -0
|
@@ -39,13 +39,6 @@ class FirecrawlApp:
|
|
|
39
39
|
data: Optional[Any] = None
|
|
40
40
|
error: Optional[str] = None
|
|
41
41
|
|
|
42
|
-
class ErrorResponse(pydantic.BaseModel):
|
|
43
|
-
"""
|
|
44
|
-
Error response.
|
|
45
|
-
"""
|
|
46
|
-
success: bool
|
|
47
|
-
error: str
|
|
48
|
-
|
|
49
42
|
def __init__(self, api_key: Optional[str] = None, api_url: Optional[str] = None) -> None:
|
|
50
43
|
"""
|
|
51
44
|
Initialize the FirecrawlApp instance with API key, API URL.
|
|
@@ -460,7 +453,7 @@ class FirecrawlApp:
|
|
|
460
453
|
self._handle_error(response, 'check batch scrape status')
|
|
461
454
|
|
|
462
455
|
|
|
463
|
-
def extract(self, urls: List[str], params: Optional[ExtractParams] = None) ->
|
|
456
|
+
def extract(self, urls: List[str], params: Optional[ExtractParams] = None) -> Any:
|
|
464
457
|
"""
|
|
465
458
|
Extracts information from a URL using the Firecrawl API.
|
|
466
459
|
|
|
@@ -493,7 +486,11 @@ class FirecrawlApp:
|
|
|
493
486
|
headers
|
|
494
487
|
)
|
|
495
488
|
if response.status_code == 200:
|
|
496
|
-
|
|
489
|
+
data = response.json()
|
|
490
|
+
if data['success']:
|
|
491
|
+
return data
|
|
492
|
+
else:
|
|
493
|
+
raise Exception(f'Failed to extract. Error: {data["error"]}')
|
|
497
494
|
else:
|
|
498
495
|
self._handle_error(response, "extract")
|
|
499
496
|
except Exception as e:
|
|
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
|