Update
This commit is contained in:
@@ -50,7 +50,7 @@ ### Supported Parameters (mapped to Browsershot capabilities)
|
|||||||
- `block_cookie_banners`: true/false - Uses cookie banner blocking patterns
|
- `block_cookie_banners`: true/false - Uses cookie banner blocking patterns
|
||||||
- `block_trackers`: true/false - Uses tracker blocking patterns
|
- `block_trackers`: true/false - Uses tracker blocking patterns
|
||||||
- `delay`: Wait time before capture in milliseconds (via `setDelay()`)
|
- `delay`: Wait time before capture in milliseconds (via `setDelay()`)
|
||||||
- `wait_until_network_idle`: Wait for network activity to cease (via `waitUntilNetworkIdle()`)
|
- Network idle waiting is always enabled for optimal rendering (no parameter needed)
|
||||||
|
|
||||||
**Screenshot Capture**:
|
**Screenshot Capture**:
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ ### Browsershot Configuration
|
|||||||
->windowSize($width, $height)
|
->windowSize($width, $height)
|
||||||
->setScreenshotType('webp', $quality) // Always WebP format
|
->setScreenshotType('webp', $quality) // Always WebP format
|
||||||
->setDelay($delayInMs)
|
->setDelay($delayInMs)
|
||||||
->waitUntilNetworkIdle()
|
// Network idle waiting is always enabled
|
||||||
->timeout($timeoutInSeconds);
|
->timeout($timeoutInSeconds);
|
||||||
|
|
||||||
// Apply EasyList filters if block_ads is true
|
// Apply EasyList filters if block_ads is true
|
||||||
@@ -193,7 +193,7 @@ ### Browsershot Configuration
|
|||||||
// HTML crawling configuration with EasyList filtering
|
// HTML crawling configuration with EasyList filtering
|
||||||
$browsershot = Browsershot::url($url)
|
$browsershot = Browsershot::url($url)
|
||||||
->setDelay($delayInMs)
|
->setDelay($delayInMs)
|
||||||
->waitUntilNetworkIdle()
|
// Network idle waiting is always enabled
|
||||||
->timeout($timeoutInSeconds);
|
->timeout($timeoutInSeconds);
|
||||||
|
|
||||||
// Apply EasyList filters if block_ads is true
|
// Apply EasyList filters if block_ads is true
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ ### Fluent HTML Crawling
|
|||||||
->blockAds(true)
|
->blockAds(true)
|
||||||
->blockCookieBanners(true)
|
->blockCookieBanners(true)
|
||||||
->blockTrackers(true)
|
->blockTrackers(true)
|
||||||
->waitUntilNetworkIdle(true)
|
// Network idle waiting is always enabled for optimal rendering
|
||||||
->webhookUrl('https://myapp.com/webhooks/crawlshot')
|
->webhookUrl('https://myapp.com/webhooks/crawlshot')
|
||||||
->webhookEventsFilter(['completed', 'failed'])
|
->webhookEventsFilter(['completed', 'failed'])
|
||||||
->create(); // Returns CrawlResponse
|
->create(); // Returns CrawlResponse
|
||||||
@@ -179,7 +179,7 @@ #### CrawlJobBuilder Methods
|
|||||||
->blockAds(bool $block = true) // Block ads via EasyList
|
->blockAds(bool $block = true) // Block ads via EasyList
|
||||||
->blockCookieBanners(bool $block = true) // Block cookie banners
|
->blockCookieBanners(bool $block = true) // Block cookie banners
|
||||||
->blockTrackers(bool $block = true) // Block tracking scripts
|
->blockTrackers(bool $block = true) // Block tracking scripts
|
||||||
->waitUntilNetworkIdle(bool $wait = true) // Wait for network idle
|
// waitUntilNetworkIdle is always enabled server-side for optimal rendering
|
||||||
->create(); // Execute and return CrawlResponse
|
->create(); // Execute and return CrawlResponse
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ ### Custom Options
|
|||||||
$crawl = $client->crawl('https://spa-website.com')
|
$crawl = $client->crawl('https://spa-website.com')
|
||||||
->timeout(120) // Long timeout for slow sites
|
->timeout(120) // Long timeout for slow sites
|
||||||
->delay(3000) // Wait 3 seconds for JS
|
->delay(3000) // Wait 3 seconds for JS
|
||||||
->waitUntilNetworkIdle(true) // Wait for AJAX requests
|
// Network idle waiting is always enabled for AJAX/dynamic content
|
||||||
->blockAds(false) // Allow ads for testing
|
->blockAds(false) // Allow ads for testing
|
||||||
->blockCookieBanners(true) // But block cookie banners
|
->blockCookieBanners(true) // But block cookie banners
|
||||||
->webhookUrl('https://myapp.com/webhook')
|
->webhookUrl('https://myapp.com/webhook')
|
||||||
|
|||||||
@@ -56,11 +56,8 @@ public function blockTrackers(bool $block = true): self
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function waitUntilNetworkIdle(bool $wait = true): self
|
// waitUntilNetworkIdle is always enabled server-side for optimal rendering
|
||||||
{
|
// This method has been removed as the parameter is no longer supported
|
||||||
$this->options['wait_until_network_idle'] = $wait;
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function create(): CrawlResponse
|
public function create(): CrawlResponse
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user