Skip to content

Commit

Permalink
Merge pull request #38 from flangofas/pass-options
Browse files Browse the repository at this point in the history
Pass options to chrome client
  • Loading branch information
zrashwani authored Oct 19, 2021
2 parents 9c1e553 + d1d3cd0 commit 4e31015
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Arachnid/Adapters/PantherChromeAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
class PantherChromeAdapter implements CrawlingAdapterInterface
{
private $client;
public function __construct()

public function __construct(array $options)
{
$this->client = PantherClient::createChromeClient();
$this->client = PantherClient::createChromeClient(null, null, $options);
}

public function requestPage($url): Crawler
{
return $this->client->request('GET', $url);
Expand Down
6 changes: 6 additions & 0 deletions src/Arachnid/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ class Crawler
*/
private $headlessBrowserEnabled;

/**
* Links' container
* @var array<string,Link>
*/
private $links;

/**
* Constructor
* @param string $baseUrl base url to be crawled
Expand Down

0 comments on commit 4e31015

Please sign in to comment.