Provide any sample exaple how to crawl url #394
Avishaidev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
Is there any sample example how to get strart with this?
My code:
`use Spatie\Crawler\Crawler;
use Spatie\Crawler\CrawlObservers\CrawlObserver;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\ResponseInterface;
use GuzzleHttp\Exception\RequestException;
require DIR . '/vendor/autoload.php';
class MyCrawl extends CrawlObserver {
private $res;
}
$observ = new MyCrawl();
$url = 'https://www.facebook.com/Mhfootballclub/about/';
Crawler::create()->setCrawlObserver($observ)->startCrawling($url);`
What am i missing?
Beta Was this translation helpful? Give feedback.
All reactions