A Laravel package to extract readable text from HTML.
irelic/readability-laravel is a Laravel package for a laravel package to extract readable text from html..
It currently has 1 GitHub stars and 23 downloads on Packagist (latest version 2.1.0).
Install it with composer require irelic/readability-laravel.
Discover more Laravel packages by irelic
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel package to extract readable text from HTML.
This package is actually a wrapper class of feelinglucky/php-readability.
Execute composer command.
composer require irelic/readability-laravel
Set the service provider in app.php
'providers' => [
Sukohi\LaravelReadability\LaravelReadabilityServiceProvider::class
]
and alias.
'aliases' => [
'LaravelReadability' => Sukohi\LaravelReadability\Facades\LaravelReadability::class
]
$readability = \LaravelReadability::make($html);
try {
$data = $readability->getContent();
dd($data)
} catch (\Exception $e) {
// Content not found
}
$readability = \LaravelReadability::make($html, 'Shift_JIS');
This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh