sanzodown / simple-php-crawler
A simple crawler written in PHP.
dev-master
2021-03-24 18:53 UTC
Requires
- php: ^7.2
- ext-curl: *
- ext-dom: *
- symfony/css-selector: ^5.2
Requires (Dev)
- phpunit/phpunit: ^8.5
- symfony/var-dumper: ^5.2
This package is not auto-updated.
Last update: 2024-10-03 11:11:43 UTC
README
A simple crawler library for php using DOMDocument. For educational purpose.
Installation
composer require sanzodown/simple-php-crawler
Usage
$crawler = new Crawler("https://www.domain.com/"); // if u need to be authentificated $crawler->setLogin("username","password");
Methods:
//return an array of the DOMNode $result = $crawler->filter(".header-logo > a"); //some lazy methods $imgs = $crawler->getAllImages(); $links = $crawler->getAllLinks();