LaravelPackages.net
Acme Inc.
Toggle sidebar
irelic/readability-laravel

A Laravel package to extract readable text from HTML.

23
1
2.1.0
About irelic/readability-laravel

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

LaravelReadability

A Laravel package to extract readable text from HTML.
This package is actually a wrapper class of feelinglucky/php-readability.

Installation

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
]

Basic Usage

$readability = \LaravelReadability::make($html);

try {

    $data = $readability->getContent();
    dd($data)

} catch (\Exception $e) {

    // Content not found

}

with Encoding

$readability = \LaravelReadability::make($html, 'Shift_JIS');

License

This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh

Comments