Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Link content parser

8 sites Security covered
View on drupal.org

This module extracts key information like titles, authors, excerpts, and images from any provided URL. It offers multiple parsing methods, including PHP readability, and can save extracted images directly into your content.

The Link content parser module extracts essential information from any URL you give it.
That includes article content, titles, authors, excerpts, lead images, and more.

It will be useful when you want to copy content from url. you have to copy title, save image, summary etc.. this module process for you quickly

Post-Installation

Install module with composer it will add library needed to vendor.
run

composer require drupal/postlight_parser

It will install all libraries right way. If you have problem with composer you can install separed readability

composer require fivefilters/readability.php
composer require drupal/postlight_parser

If your server supports nodejs you can:

  • Install Postlight Parser (The Postlight parser is not bad, the content received is clear)
    yarn global add @postlight/parser
    or
    npm -g install @postlight/parser
    
  • Or Install mercury Parser in your environment.
    yarn global add parse-server
  • Or Install Postlight / Mercury Parser api

Otherwise, the module will get content by PHP readability from url (it works fine in most of the case).

  • If you want to use library Graby You have to install php-tidy on your server manual
    sudo apt-get install php-tidy
    composer require j0k3r/graby
  • Support Embera for media page like youtube, dailymotion, tiktok (Ckeditor5 must active iframe, blockquote,...)

Configuration

  • Create link fields
  • In widget select Postlight parser (PHP readability is default)
  • Map yours field to get extracted content
  • Ckeditor 5 support you can add "Url get Content" button in ckeditor 5 configuration
  • Save images inline option will save all images in content from url to public://inline-images, it can also save image base64. This option dosen't work with breakpoints picture
  • If you want to embed a podcast audio, video from social media, you can enable tag iframe (youtube, dailymotion), blockquote (tiktok)...

For developper
You can use /parser/readability?url=LINK_TO_GET_CONTENT
it will return json {title,content,excerpt,lead_image_url,author}
For crawling content you can use service postlight_parser.url_parser
Example:

    $argument = [
      'url' => 'https://lemonde.fr/article_xxx.html',
      'parser' => 'readability', // graby, postlight, mercury, embera
      'save_image' => TRUE,
    ];
    $output = \Drupal::service('postlight_parser.url_parser')->parser($argument);
    if (!empty($article = $output['data'])) {
       $new_article = Node::create(['type' => 'article']);
    $new_article->set('title', $article['title']);
    $new_article->set('body', $article['content']);
    $new_article->enforceIsNew();
    $new_article->save();
    }

In progress:
- Insert image / video into entity widget field image (missing remove button, please help)

Do you like this module? Show your appreciation by buying me ☕.

Activity

Total releases
1
First release
Jun 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
1.0.2 Stable Jun 20, 2025