Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat(python-sdk): implement missing crawl_entire_domain parameter (#1896)
devin-ai-integration[bot]269c7097cba9
diff --git a/apps/python-sdk/firecrawl/__tests__/v1/e2e_withAuth/test.py b/apps/python-sdk/firecrawl/__tests__/v1/e2e_withAuth/test.pyindex db7301fe3..615655651 100644--- a/apps/python-sdk/firecrawl/__tests__/v1/e2e_withAuth/test.py+++ b/apps/python-sdk/firecrawl/__tests__/v1/e2e_withAuth/test.py@@ -5,6 +5,7 @@ import osfrom uuid import uuid4from dotenv import load_dotenvfrom datetime import datetime+from firecrawl.firecrawl import SearchParamsload_dotenv()@@ -249,6 +250,21 @@ def test_crawl_url_with_idempotency_key_e2e():app.crawl_url('https://firecrawl.dev', {'excludePaths': ['blog/*']}, True, 2, uniqueIdempotencyKey)assert "Idempotency key already used" in str(excinfo.value)+def test_crawl_url_with_crawl_entire_domain():+ app = FirecrawlApp(api_url=API_URL, api_key=TEST_API_KEY)+ response = app.crawl_url(+ 'https://roastmywebsite.ai',+ crawl_entire_domain=True,+ limit=3,+ poll_interval=2+ )+ assert response is not None+ assert 'total' in response+ assert response['total'] > 0+ assert 'status' in response+ assert response['status'] == 'completed'+ assert len(response['data']) > 0+def test_check_crawl_status_e2e():app = FirecrawlApp(api_url=API_URL, api_key=TEST_API_KEY)response = app.crawl_url('https://firecrawl.dev', {'scrapeOptions': {'formats': ['markdown', 'html', 'rawHtml', 'screenshot', 'links']}}, False)diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.pyindex 86a32a1fd..df415d4ce 100644--- a/apps/python-sdk/firecrawl/firecrawl.py+++ b/apps/python-sdk/firecrawl/firecrawl.py@@ -264,6 +264,7 @@ class CrawlParams(pydantic.BaseModel):maxDiscoveryDepth: Optional[int] = Nonelimit: Optional[int] = NoneallowBackwardLinks: Optional[bool] = None+ crawlEntireDomain: Optional[bool] = NoneallowExternalLinks: Optional[bool] = NoneignoreSitemap: Optional[bool] = NonescrapeOptions: Optional[ScrapeOptions] = None@@ -1161,6 +1162,7 @@ class FirecrawlApp:max_discovery_depth=max_discovery_depth,limit=limit,allow_backward_links=allow_backward_links,+ crawl_entire_domain=crawl_entire_domain,allow_external_links=allow_external_links,ignore_sitemap=ignore_sitemap,scrape_options=scrape_options,