From 432acb747535005047479bcc495c56ba1940a81c Mon Sep 17 00:00:00 2001 From: James Date: Mon, 16 Nov 2020 12:58:28 +0000 Subject: [PATCH] add setUserAgent support --- src/Crawler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Crawler.php b/src/Crawler.php index 948db2e..e2a4a13 100644 --- a/src/Crawler.php +++ b/src/Crawler.php @@ -28,6 +28,10 @@ class Crawler{ $this->crawler->setCrawlProfile(new CrawlAllUrls()); } + public function setUserAgent($agent){ + $this->crawler->setUserAgent($agent); + } + public function crawl($url){ $this->crawler->startCrawling($url); }