zrashwani / arachnid

Crawl all unique internal links found on a given website, and extract SEO related information - supports javascript based sites
MIT License
253 stars 60 forks source link

Catchable fatal error #12

Closed ArYaNsH closed 8 years ago

ArYaNsH commented 8 years ago

I'm getting this error while running the code:

Catchable fatal error: Argument 1 passed to Front\simpleCrawler::extractTitleInfo() must be an instance of Front\DomCrawler, instance of Symfony\Component\DomCrawler\Crawler given, called in C:\xampp\htdocs\webAN\src\Front\FrontController.php on line 336 and defined in C:\xampp\htdocs\webAN\src\Front\FrontController.php on line 453

zrashwani commented 8 years ago

Hello, this error seems to be related to using namespaces; I guess you are trying to extend \Arachnid\Crawler class and override extractTitleInfo() method without using the proper namespace, try place the following line at the beginning of your class - after your namespace line - use Symfony\Component\DomCrawler\Crawler as DomCrawler;

ArYaNsH commented 8 years ago

I already have this line, however my namespace is different it that a problem?

zrashwani commented 8 years ago

Can you provide the code sample you are using to trace?

zrashwani commented 8 years ago

closed, due to lack of response