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_trackers`: true/false - Uses tracker blocking patterns
|
||||
- `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**:
|
||||
|
||||
@@ -177,7 +177,7 @@ ### Browsershot Configuration
|
||||
->windowSize($width, $height)
|
||||
->setScreenshotType('webp', $quality) // Always WebP format
|
||||
->setDelay($delayInMs)
|
||||
->waitUntilNetworkIdle()
|
||||
// Network idle waiting is always enabled
|
||||
->timeout($timeoutInSeconds);
|
||||
|
||||
// Apply EasyList filters if block_ads is true
|
||||
@@ -193,7 +193,7 @@ ### Browsershot Configuration
|
||||
// HTML crawling configuration with EasyList filtering
|
||||
$browsershot = Browsershot::url($url)
|
||||
->setDelay($delayInMs)
|
||||
->waitUntilNetworkIdle()
|
||||
// Network idle waiting is always enabled
|
||||
->timeout($timeoutInSeconds);
|
||||
|
||||
// Apply EasyList filters if block_ads is true
|
||||
|
||||
@@ -117,7 +117,7 @@ ### Fluent HTML Crawling
|
||||
->blockAds(true)
|
||||
->blockCookieBanners(true)
|
||||
->blockTrackers(true)
|
||||
->waitUntilNetworkIdle(true)
|
||||
// Network idle waiting is always enabled for optimal rendering
|
||||
->webhookUrl('https://myapp.com/webhooks/crawlshot')
|
||||
->webhookEventsFilter(['completed', 'failed'])
|
||||
->create(); // Returns CrawlResponse
|
||||
@@ -179,7 +179,7 @@ #### CrawlJobBuilder Methods
|
||||
->blockAds(bool $block = true) // Block ads via EasyList
|
||||
->blockCookieBanners(bool $block = true) // Block cookie banners
|
||||
->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
|
||||
```
|
||||
|
||||
@@ -382,7 +382,7 @@ ### Custom Options
|
||||
$crawl = $client->crawl('https://spa-website.com')
|
||||
->timeout(120) // Long timeout for slow sites
|
||||
->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
|
||||
->blockCookieBanners(true) // But block cookie banners
|
||||
->webhookUrl('https://myapp.com/webhook')
|
||||
|
||||
@@ -56,11 +56,8 @@ public function blockTrackers(bool $block = true): self
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function waitUntilNetworkIdle(bool $wait = true): self
|
||||
{
|
||||
$this->options['wait_until_network_idle'] = $wait;
|
||||
return $this;
|
||||
}
|
||||
// waitUntilNetworkIdle is always enabled server-side for optimal rendering
|
||||
// This method has been removed as the parameter is no longer supported
|
||||
|
||||
public function create(): CrawlResponse
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user