paumel / scrapper
Package to get info from URL
v0.0.4
2020-04-28 18:12 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ^6.3 || ^7.0
- guzzlehttp/psr7: ^1.4
This package is auto-updated.
Last update: 2024-04-09 00:21:29 UTC
README
Use this package if you want to extract some HTML or JSON info from websites
Table of Contents
Installation
Install package to your root Laravel project directory
composer require paumel/scrapper
Usage
Import scraper class:
use Paumel\Scrapper\Scrapper;
If you want to scrape HTML data:
$scrapper = new Scrapper('http://test.com', 'html'); $data = $scrapper->find('a.test-class');
More about selecting HTML elements
If you want to scrape JSON data:
$scrapper = new Scrapper('http://test.com', 'json'); $data = $scrapper->find('json_parameter');