revolution / laravel-fullfeed
Extracts the main content from web pages for use in feed readers
Fund package maintenance!
invokable
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
pkg:composer/revolution/laravel-fullfeed
Requires
- php: ^8.4
- ext-dom: *
- ext-libxml: *
- illuminate/support: ^12.0
Requires (Dev)
- laravel/pint: ^1.22
- orchestra/testbench: ^10.0
- pestphp/pest: ^4.1
- pestphp/pest-plugin-laravel: ^4.0
- revolution/laravel-boost-copilot-cli: ^1.0
README
Overview
FullFeed is a Laravel package that extracts the main content from web pages for use in feed readers.
It uses site-specific rules defined in a JSON file to parse and retrieve exactly the content you need.
We've separated the FullFeed package from our private feed reader app and made it publicly available.
Requirements
- PHP >= 8.4
- Since using
Dom\HTMLDocument, must be 8.4 or higher.
- Since using
- Laravel >= 12.x
Installation
composer require revolution/laravel-fullfeed
Publish config and site definition files
php artisan vendor:publish --tag=fullfeed
config/fullfeed.php and resources/fullfeed will be created.
Configuration
If you want to add your own site rules, add them in resources/fullfeed.
Usage
use Revolution\Fullfeed\Facades\FullFeed; $html = FullFeed::get($url);
Testing
use Revolution\Fullfeed\Facades\FullFeed; FullFeed::expects('get') ->with('https://example.com/article/1') ->andReturn('<div>Main content</div>'); // Your test code here
License
MIT