smartango / verygrabber
There is no license information available for the latest version (dev-main) of this package.
generic grabber based on DOMDocument, grabbing infos from an html page
dev-main
2025-12-18 06:54 UTC
Requires (Dev)
- phpunit/php-invoker: 6.0.0
- phpunit/phpunit: 12.1.5
This package is auto-updated.
Last update: 2026-02-18 07:19:45 UTC
README
smartango/verygrabber scrape html following a json schema definition.
It is designed to grab an array of elements, such as table rows or list of DIVs.
Usage
use \smrtg\VeryGrabber\GrabFromSchema; $doc = file_get_contents(dirname(__FILE__).'/data/file.html'); $grab = new GrabFromSchema($doc); $schema = file_get_contents(dirname(__FILE__).'/data/schema.json'); $data = $grab->getStruct($schema);
See tests/data/schema.json for the json schema definition: it follows a recursive descending parser concept in the DOM