From e3f0a0e43e2601dece69efba5ddae66dc47ba7b3 Mon Sep 17 00:00:00 2001 From: Antonis Flangofas Date: Thu, 14 Oct 2021 15:50:04 +0300 Subject: [PATCH 1/2] Pass options to chrome client --- src/Arachnid/Adapters/PantherChromeAdapter.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Arachnid/Adapters/PantherChromeAdapter.php b/src/Arachnid/Adapters/PantherChromeAdapter.php index 2c99dd7..a752308 100644 --- a/src/Arachnid/Adapters/PantherChromeAdapter.php +++ b/src/Arachnid/Adapters/PantherChromeAdapter.php @@ -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); From d1d3cd0e06470955fd3968afdf93eb475ab397de Mon Sep 17 00:00:00 2001 From: Antonis Flangofas Date: Thu, 14 Oct 2021 15:52:33 +0300 Subject: [PATCH 2/2] Defined links --- src/Arachnid/Crawler.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Arachnid/Crawler.php b/src/Arachnid/Crawler.php index 55f3450..3629e00 100644 --- a/src/Arachnid/Crawler.php +++ b/src/Arachnid/Crawler.php @@ -87,6 +87,12 @@ class Crawler */ private $headlessBrowserEnabled; + /** + * Links' container + * @var array + */ + private $links; + /** * Constructor * @param string $baseUrl base url to be crawled