mediashare/crawler

Crawl urls from a webpage and provide a DomCrawler with Scraper Library

0.1.4 2019-12-27 19:53 UTC

This package is auto-updated.

Last update: 2019-12-27 19:53:59 UTC


README

💫 Crawl urls from a webpage and provide a DomCrawler with Scraper Library.

DomCrawler

Scraper use DomCrawler library. This is symfony component for DOM navigation for HTML and XML documents. You can retrieve Documentation Here.

Installation

composer require mediashare/crawler

Usage

<?php
require 'vendor/autoload.php';

use Mediashare\Crawler\Crawler;

$crawler = new Crawler("http://marquand.pro");
$crawler->run();
dump($crawler);
With Config
<?php
require 'vendor/autoload.php';

use Mediashare\Crawler\Crawler;
use Mediashare\Crawler\Config;

$config = new Config();
$config->setWebspider(true); // All website crawling
$config->setVerbose(true); // Prompt progress bar

$crawler = new Crawler("http://marquand.pro", $config);
$crawler->run();
dump($crawler);