Download the PHP package tacman/php-readability without Composer
On this page you can find all versions of the php package tacman/php-readability. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tacman/php-readability
More information about tacman/php-readability
Files in tacman/php-readability
Package php-readability
Short Description Automatic article extraction from HTML, fork of j0k3r/php-readability
License Apache-2.0
Informations about the package php-readability
Readability
This is an extract of the Readability class from this full-text-rss fork. It can be defined as a better version of the original php-readability.
Differences
The default php-readability lib is really old and needs to be improved. I found a great fork of full-text-rss from @Dither which improve the Readability class.
- I've extracted the class from its fork to be able to use it out of the box
- I've added some simple tests
- and changed the CS, run
php-cs-fixer
and added a namespace
But the code is still really hard to understand / read ...
Requirements
By default, this lib will use the Tidy extension if it's available. Tidy is only used to cleanup the given HTML and avoid problems with bad HTML structure, etc .. It'll be suggested by Composer.
Also, if you got problem from parsing a content without Tidy installed, please install it and try again.
Usage
If you want to debug it, or check what's going on, you can inject a logger (which must follow Psr\Log\LoggerInterface
, Monolog for example):
All versions of php-readability with dependencies
ext-mbstring Version *
psr/log Version ^3.0
masterminds/html5 Version ^2.7