{"id":22332500,"url":"https://github.com/the-3labs-team/laravel-readability","last_synced_at":"2025-08-27T13:19:34.249Z","repository":{"id":225230622,"uuid":"765400012","full_name":"The-3Labs-Team/laravel-readability","owner":"The-3Labs-Team","description":"🦮 Laravel Readability is a supercharged PHP client that allows you to use readability.php library on your project","archived":false,"fork":false,"pushed_at":"2025-08-11T23:26:26.000Z","size":188,"stargazers_count":17,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T21:55:10.355Z","etag":null,"topics":["accessibility","laravel","php"],"latest_commit_sha":null,"homepage":"https://3labs.it","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/The-3Labs-Team.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-29T21:02:30.000Z","updated_at":"2025-07-28T21:53:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a17a6ed-86e4-459a-92cb-4e3357168519","html_url":"https://github.com/The-3Labs-Team/laravel-readability","commit_stats":null,"previous_names":["the-3labs-team/laravel-readability"],"tags_count":5,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/The-3Labs-Team/laravel-readability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-3Labs-Team%2Flaravel-readability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-3Labs-Team%2Flaravel-readability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-3Labs-Team%2Flaravel-readability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-3Labs-Team%2Flaravel-readability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-3Labs-Team","download_url":"https://codeload.github.com/The-3Labs-Team/laravel-readability/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-3Labs-Team%2Flaravel-readability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272335690,"owners_count":24916520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-27T02:00:09.397Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","laravel","php"],"created_at":"2024-12-04T04:18:23.241Z","updated_at":"2025-08-27T13:19:34.207Z","avatar_url":"https://github.com/The-3Labs-Team.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/the-3labs-team/laravel-readability/raw/HEAD/art/banner.png\" width=\"100%\" alt=\"Logo Laravel Readability\"\u003e\u003c/p\u003e\n\n# Laravel Readability\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/the-3labs-team/laravel-readability.svg?style=flat-square)](https://packagist.org/packages/the-3labs-team/laravel-readability)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![Github PHPStan](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/phpstan.yml?branch=main\u0026label=phpstan\u0026style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Aphpstan+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Maintainability](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/maintainability)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/test_coverage)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/test_coverage)\n![License Mit](https://img.shields.io/github/license/murdercode/laravel-shortcode-plus)\n[![Total Downloads](https://img.shields.io/packagist/dt/the-3labs-team/laravel-readability.svg?style=flat-square)](https://packagist.org/packages/the-3labs-team/laravel-readability)\n\nThis package is a Laravel wrapper for [readability.php](https://github.com/fivefilters/readability.php). It provides a\nsimple way to extract the main content from a webpage.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require the-3labs-team/laravel-readability\n```\n\nSince it uses the readability.php package, you will need the following PHP extensions:\n\n```bash\n$ sudo apt-get install php7.4-xml php7.4-mbstring\n```\n\nPlease change the version according to your PHP version.\n\n## Usage\n\n```php\nuse The3LabsTeam\\LaravelReadability\\Facades\\Readability;\n\n$html = '\u003chtml\u003e...\u003c/html\u003e';\n$parsed = Readability::parse($html);\n$title = $parsed-\u003egetTitle();\n```\n\nYou can use the same methods as the original package. Please refer to\nthe [readability.php documentation](https://github.com/fivefilters/readability.php).\n\n```php\n$html = '\u003chtml\u003e...\u003c/html\u003e';\n$parsed = Readability::parse($html);\n\n$title = $parsed-\u003egetTitle();\n$content = $parsed-\u003egetContent();\n$excerpt = $parsed-\u003egetExcerpt();\n$author = $parsed-\u003egetAuthor();\n$direction = $parsed-\u003egetDirection();\n$image = $parsed-\u003egetImage();\n$images = $parsed-\u003egetImages();\n```\n\n### Get the source list\n\n```php\nuse The3LabsTeam\\LaravelReadability\\Readability as ReadabilityClass;\n\n$html = '\u003chtml\u003e...\u003c/html\u003e';\n$parse = (new ReadabilityClass($html))\n-\u003egetSourceList(\n    domainWhitelist: ['example.com', 'another-example.com/some-path'],\n    tagsToExtract: ['a', 'iframe', 'text'] // Optional, default is ['a', 'iframe']\n)\n-\u003eparse();\n$content = $parsed-\u003egetContent();\n```\n\n´$content´ will contain the list of sources in the article.\n\n```html\n...\n\u003cp\u003eSource list: https://example.com/source1, https://example.com/source2\u003c/p\u003e\n```\n\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Stefano Novelli](https://github.com/murdercode)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Sponsor\n\n\u003cdiv\u003e  \n    \u003ca href=\"https://www.tomshw.it/\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n        \u003cimg  src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/toms.png\" alt=\"Tom's Hardware - Notizie, recensioni, guide all'acquisto e approfondimenti per tutti gli appassionati di computer, smartphone, videogiochi, film, serie tv, gadget e non solo\" /\u003e  \n    \u003c/a\u003e\n    \u003ca href=\"https://spaziogames.it/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/spazio.png\" alt=\"Spaziogames - Tutto sul mondo dei videogiochi. Troverai tantissime anteprime, recensioni, notizie dei giochi per tutte le console, PC, iPhone e Android.\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://cpop.it/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/cpop.png\" alt=\"Cpop - News, recensioni, guide su fumetto, cinema \u0026 serie TV, gioco da tavolo e di ruolo e collezionismo. Tutto quello di cui hai bisogno per rimanere aggiornato sul mondo della cultura pop\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://data4biz.com/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/d4b.png\" alt=\"Data4Biz - Sito dedicato alla trasformazione digitale del business\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://soshomegarden.com/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/sos.png\" alt=\"SOS Home \u0026 Garden - Realtà dedicata a 360 gradi ai settori della casa e del giardino.\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://global.techradar.com/it-it\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/techradar.png\" alt=\"Techradar - Le ultime notizie e recensioni dal mondo della tecnologia, su computer, sistemi per la casa, gadget e altro.\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://aibay.it/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/aibay.png\" alt=\"Aibay - Scopri AiBay, il leader delle notizie sull'intelligenza artificiale. Resta aggiornato sulle ultime innovazioni, ricerche e tendenze del mondo AI con approfondimenti, interviste esclusive e analisi dettagliate.\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://coinlabs.it/\" target=\"_blank\" rel=\"noopener noreferrer\" \u003e\n        \u003cimg src=\"https://3labs-assets.b-cdn.net/assets/logos/banner-github/coinlabs.png\" alt=\"Coinlabs - Notizie, analisi approfondite, guide e opinioni aggiornate sul mondo delle criptovalute, blockchain e finanza\" /\u003e\n    \u003c/a\u003e\n\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-3labs-team%2Flaravel-readability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-3labs-team%2Flaravel-readability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-3labs-team%2Flaravel-readability/lists"}