add setUserAgent support
This commit is contained in:
parent
6b28eb168e
commit
432acb7475
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user