sukohi/laravel-readability

A Laravel package to extract readable text from HTML.
202 4
Install
composer require sukohi/laravel-readability
Latest Version:2.0.1
License:MIT
Last Updated:Feb 17, 2017
Links: GitHub  ·  Packagist
Maintainer: Sukohi

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 sukohi/laravel-readability:2.*

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

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

612,604,198 9,704
laravel/framework

The Laravel Framework.

554,918,666 34,821
laravel/tinker

Powerful REPL for the Laravel framework.

465,424,253 7,437