A Web Scraper for Laravel 5

0.0.2 2016-08-26 18:42 UTC

This package is auto-updated.

Last update: 2024-11-06 14:33:40 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Install

Via Composer

$ composer require jeroenherczeg/hyena

Next, you must install the service provider:

// config/app.php
'providers' => [
    ...
    Jeroenherczeg\Hyena\HyenaServiceProvider::class,
];

And add facade:

// config/app.php
'aliases' => [
    ...
    Jeroenherczeg\Hyena\Facades\Hyena::class,
];

Usage

$result = Hyena::visit('https://github.com')->extract(['name', 'images']);
$result = Hyena::visit('https://github.com')->extract(['name', 'images'], [
    'min_image_width'    => 50, // optional, minimal width of picture in px
    'min_image_height'   => 50, // optional, minimal height of picture in px
    'min_image_filesize' => 16000, // optional, minimal filesize of picture in bytes
    'limit_images'       => 10  // optional, max count of images to return
]);
[
  'name' => 'Github',
  'images' => [
    'https://avatars1.githubusercontent.com/u/759412?v=3&s=40',
    'https://assets-cdn.github.com/images/spinners/octocat-spinner-128.gif',
    'https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif'
  ]
]

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email jeroen@herczeg.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.