Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Readability Laravel Package

j0k3r/php-readability

Extracts the main article content and title from messy web pages in PHP. Improved fork of php-readability with tests, namespacing, and optional HTML cleanup via Tidy (or libxml). Supports PSR-3 logging for debugging.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Content Strategy & UX Improvements

    • Enable "Readability Mode" for articles, blogs, or news platforms to declutter content and improve user engagement.
    • Support accessibility compliance by stripping non-essential elements (ads, sidebars, navigation) for users with visual impairments or slow connections.
    • Align with roadmap items for "cleaner content consumption" or "mobile-first readability" initiatives.
  • Build vs. Buy Decision

    • Buy: Pre-built solution with battle-tested extraction logic (fork of FiveFilters, a well-known project). Avoids reinventing wheel for DOM parsing, link extraction, and content normalization.
    • Custom Build: Only if needing highly specialized post-processing (e.g., domain-specific content rules) or real-time analytics integration.
  • Monetization & Ad Tech

    • Enable "clean article" sharing for affiliate links or sponsored content (e.g., "Read on [Publisher] via [Your Platform]").
    • Support ad-blocker-resistant revenue streams by serving lightweight, readability-processed content to users.
  • SEO & Performance

    • Pre-process content for faster rendering in "lite" views (e.g., AMP-like experiences without AMP complexity).
    • Use extracted metadata (title, images, links) to fuel social sharing or internal search engines.
  • Multi-Platform Sync

    • Extract core content for syncing between web, mobile apps, or email digests (e.g., "Save for Later" features).
  • Internationalization & Encoding Support

    • New: Improved handling of text encoding (e.g., tidy_repair_string fix in 1.3.1) to better support non-Latin scripts (e.g., Chinese, Arabic) and special characters, reducing garbled text in extracted content.

When to Consider This Package

  • Adopt When:

    • Your product involves long-form content (blogs, news, documentation) where users benefit from stripped-down views.
    • You lack in-house DOM parsing expertise but need reliable, configurable content extraction.
    • Your tech stack is PHP/Laravel, and you prioritize low-maintenance, open-source solutions.
    • You require Apache-2.0 licensed code (permissive for commercial use).
    • Your use case aligns with the package’s strengths: article-focused, not general-purpose HTML sanitization.
    • You handle multilingual content and need robust encoding support (verified by recent fixes in 1.3.1).
  • Look Elsewhere If:

    • You need real-time processing (this is CPU-intensive; consider caching or a microservice).
    • Your content is highly dynamic (e.g., SPAs with client-side rendering) or requires JavaScript execution (this is PHP-only).
    • You need advanced NLP (e.g., summarization, sentiment analysis) beyond basic DOM extraction.
    • Your team prefers TypeScript/JavaScript solutions (e.g., Mozilla Readability).
    • You require enterprise support (this is community-driven; consider commercial alternatives like Diffbot).
    • You process binary or non-HTML content (e.g., PDFs, images) without prior HTML conversion.

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us offer a ‘Readability Mode’—like a ‘reader view’ for our content—without building a custom solution. It’s a drop-in tool used by major platforms to declutter articles, boost engagement, and even improve ad performance. Recent updates (e.g., 1.3.1) now handle text encoding better, ensuring smooth processing of multilingual content—critical if we’re expanding globally. For example, Medium and Pocket use similar tech to keep users focused on the core content. With minimal dev effort, we can:

  • Increase time-on-site by reducing distractions.
  • Monetize better by serving clean content to users who block ads.
  • Future-proof our content strategy for mobile, accessibility, and international audiences. It’s low-risk (open-source, Apache-licensed) and aligns with our roadmap for cleaner UX."*

For Engineering:

*"j0k3r/php-readability is a maintained fork of FiveFilters’ PHP Readability—a battle-tested library for extracting article content from messy HTML. Key updates in 1.3.1:

  • Fixed encoding issues in tidy_repair_string, improving support for non-Latin scripts (e.g., Chinese, Arabic). Why it’s still a strong fit:
  • Proven reliability: Used in production by news sites and aggregators.
  • Configurable: Tweak extraction rules (e.g., prioritize images, preserve certain classes).
  • Lightweight: ~180 stars, active (last release 2026), and Apache-2.0 licensed. Tradeoffs:
  • PHP-only (no JS/Node alternatives).
  • CPU-heavy for real-time use (cache aggressively).
  • Not a silver bullet for dynamic JS content or binary formats. Recommendation: Pilot with 2–3 high-traffic articles—prioritize multilingual content—to validate UX lift and encoding stability before scaling. Pair with Laravel’s caching to mitigate performance costs."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky