add setUserAgent support
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
James 2020-11-16 12:58:28 +00:00
parent 6b28eb168e
commit 432acb7475

View File

@ -28,6 +28,10 @@ class Crawler{
$this->crawler->setCrawlProfile(new CrawlAllUrls()); $this->crawler->setCrawlProfile(new CrawlAllUrls());
} }
public function setUserAgent($agent){
$this->crawler->setUserAgent($agent);
}
public function crawl($url){ public function crawl($url){
$this->crawler->startCrawling($url); $this->crawler->startCrawling($url);
} }