iserter / php-goose
PHP 8+ article/content extractor. replacement for scotteh/php-goose (Goose)
Installs: 43
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/iserter/php-goose
Requires
- php: ^8.1|^8.2|^8.3|^8.4
- ext-dom: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.0|^8.0
Requires (Dev)
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-10-10 19:16:04 UTC
README
scotteh/php-goose is no longer maintained, so I created this alternative that supports the recent PHP versions.
There may be some issues, but so far, it's working 'ok'. Feel free to contribute.
- Extracts title, description, canonical URL, main image, and cleaned article text
- Minimal dependencies; works in any PHP app (framework-agnostic)
- DOMDocument + XPath heuristics similar to Goose/Readability techniques
Quick start
use Iserter\Goose\Goose; $goose = new Goose(); $article = $goose->extract('https://example.com/some-article'); echo $article->getTitle();
You can also pass raw HTML:
$article = $goose->extract($html, 'https://iserter.com');
Installation
Add the path repository to your root composer.json and require dev-main while developing locally.
composer require iserter/php-goose dev-main
License
MIT