Skip to content

Commit 050fa88

Browse files
committed
add return page source and scraping config
1 parent f3a23c5 commit 050fa88

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/LaravelScrapingBee.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function allowResources(): self
107107
}
108108

109109
/**
110-
* https://www.scrapingbee.com/documentation/#custom-cookies
110+
* https://www.scrapingbee.com/documentation/#cookies
111111
*/
112112
public function setCustomCookies(array $cookies): self
113113
{
@@ -201,6 +201,23 @@ public function jsonResponse(): self
201201
return $this;
202202
}
203203

204+
/**
205+
* https://www.scrapingbee.com/documentation/#return_page_source
206+
*/
207+
public function returnPageSource(): self
208+
{
209+
$this->params['return_page_source'] = true;
210+
211+
return $this;
212+
}
213+
214+
public function scrapingConfig(string $configName): self
215+
{
216+
$this->params['scraping_config'] = $configName;
217+
218+
return $this;
219+
}
220+
204221
/**
205222
* https://www.scrapingbee.com/documentation/#javascript-execution
206223
*/

0 commit comments

Comments
 (0)