News-Parser

Описание

News-parser WordPress Plugin

News-parser — это плагин для WordPress, который позволяет легко получать полный текст статьи, а также изображения с сайта с использованием RSS-ленты. Разобранные данные с сайта сохраняются в виде поста, который вы можете опубликовать или отредактировать по своему усмотрению. Это упрощает создание контента для вашего сайта.

New Features

The following new features are available in the new version of the plugin:
* Sitemap Parsing: You can now parse information directly from sitemap files, expanding the sources of data for your content.
* Yoast SEO Integration for AI Descriptions: Seamlessly integrate with Yoast SEO to automatically generate compelling post descriptions using AI, enhancing your SEO efforts.
* Expanded AI Provider Support: Enjoy greater flexibility with added support for DeepSeek and Anthropic AI APIs, alongside existing providers.
* CSS Selector Parsing Templates: Create custom parsing templates using CSS selectors for precise and targeted data extraction from websites.
* Autopilot Post Filtering: Implement advanced filtering options when using the autopilot function, giving you more control over the content processed automatically.

Website and Documentation

Explore the plugin`s resources:

Website: https://www.news-parser.com/
Documentation: Docs

Функционал

  • Поддержка редактора Gutenberg
  • Функция «Автопилот» для автоматического парсинга RSS-лент.
  • Визуальный экстрактор контента
  • Поддержка WP-CLI
  • Гибкая система создания шаблонов для ускорения Парсинга.
  • Возможность парусить не только из RSS XML, но и по URL-адресу.
  • Sitemap Parsing: Parse information directly from sitemap files.
  • Yoast SEO Integration for AI Descriptions: Generate post descriptions using AI and integrate seamlessly with Yoast SEO.
  • Expanded AI Provider Support: Supports DeepSeek, Anthropic, and other AI APIs.
  • CSS Selector Parsing Templates: Create parsing templates using CSS selectors for precise data extraction.
  • Autopilot Post Filtering: Advanced filtering options for autopilot function.

Установка

  1. Вы можете клонировать репозиторий GitHub по следующей ссылке: https://github.com/zalevsk1y/news-parser.git
  2. Или загрузите его напрямую в виде ZIP-архива:
    https://github.com/zalevsk1y/news-parser/archive/master.zip

Это загрузит самую последнюю рабочую версию плагина News-parser.

How to use NewsParser plugin?

Парсинг RSS

Для разбора RSS-ленты перейдите в меню «News Parser» -> «Разбор RSS» в административной панели вашего сайта. Введите адрес RSS-ленты в строку поиска. Нажмите кнопку «Разобрать RSS-ленту». Когда данные будут получены с сервера, они отобразятся на вашем экране. Вы можете открыть визуальный конструктор, нажав на иконку, и создать шаблон для парсинга постов из этого источника RSS или просто выбрать интересующий вас контент и сохранить его как черновик.

Посмотрите это короткое видео, чтобы узнать, КАК ПАРСИТЬ RSS с помощью плагина news-parser:

Чтобы спарсить несколько постов, выберите посты и нажмите кнопку «Разобрать выбранные». Дождитесь сохранения данных, вам будет сообщено сообщением в верхней части экрана. Иконка внизу поста позволяет перейти к редактированию или публикации сохраненного черновика. Обратите внимание, что Парсинг выбранных постов может быть выполнен только в случае, если вы создали шаблон для парсинга!

Посмотрите это короткое видео, чтобы узнать, КАК СПАРСИТЬ НЕСКОЛЬКО ПОСТОВ с помощью плагина news-parser:

Визуальный Коструктор

Чтобы создать шаблон или просто выбрать интересующий вас контент, используйте визуальный конструктор. Вы можете открыть визуальный конструктор, нажав на иконку внизу карточки поста.

Для выбора контента, щелкните на блоке, который вам нужен в основном окне, и он будет выделен бирюзовой рамкой. При наведении на контент ожидаемая область будет окрашена в бирюзовый цвет.

Чтобы отменить выбор, снова щелкните на блоке. Постарайтесь разделить разные типы контента (изображения, видео, текст) на отдельные блоки. Видео YouTube будет заменено изображением логотипа YouTube. Вы можете его выделять и это видео будет вставлено в ваш пост. Парсинг видео с других источников пока не поддерживается. Изображения вставляются в ваш пост как ссылка; исключением является изображение-обложка, которое сохраняется в вашей медиатеке.

В боковой панели вы можете изменить изображение-обложку вашего поста. Просто выберите соответствующее изображение слева от дизайнера и нажмите кнопку «Сменить изображение». Последнее выбранное изображение будет выбрано в качестве изображения-обложки. Вы также можете создать пост без изображения-обложки. Просто щелкните «Без изображения-обложки».

Вы можете изменить название поста в следующем подменю «Заголовок поста». Напишите свою версию заголовка поста в текстовом поле и нажмите кнопку «Изменить заголовок».

Чтобы добавить ссылку на источник, установите флажок «Добавить ссылку на источник» в посте в подменю «Дополнительные опции».

Beyond visual content selection, you can now also leverage the power of AI directly within the constructor. A dedicated ‘AI’ tab is now available in the panel, allowing you to generate content using AI models. Simply navigate to the ‘AI’ tab to explore the available options and create engaging content.

Furthermore, to optimize your posts for search engines, you can now easily add AI-generated SEO descriptions.Within the panel, you will find an ‘SEO’ tab. In the ‘SEO’ tab, you can utilize AI to create compelling post descriptions, enhancing your SEO directly from the post visual creation interface.
Watch this short video to learn HOW TO USE VISUAL CONSTRUCTOR:

Создать Парсинг Шаблон

Для сохранения шаблона необходимо выделить контент в основном окне визуального конструктора, выбрать пункт «Сохранить шаблон Парсинга, который можно использовать при автоматическом Парсинге с этого источника» и нажать кнопку «Сохранить шаблон». Важно понимать, что отдельные посты, даже с одного источника, могут быть очень разными, поэтому разобранные страницы могут не содержать нужного вам контента.

Now, you can also create powerful parsing templates using CSS selectors. In the ‘Template’ tab within the Visual Constructor, you’ll find a new section called ‘Template Patterns’. As you visually select elements in the main window, you will see their corresponding CSS selectors populate in the ‘Template Patterns’ block.

If you select the ‘Save Parsing Template’ checkbox, you unlock the ability to directly edit these template patterns. Two editable parameters become available: ‘Elements pattern’ and ‘Exclude elements pattern’.

It’s important to note that when you edit the ‘Elements pattern’ field, the elements you selected visually in the constructor will be disregarded. Therefore, if you intend to primarily use the visual constructor for creating parsing rules, leave the ‘Elements pattern’ field empty.

When editing the pattern fields, separate each CSS selector with a comma. Once you have finished editing your CSS selector patterns, click the ‘Update’ button to apply the changes and save your template. This allows for fine-grained control over content selection using the precision of CSS selectors.

Посмотрите это короткое видео, чтобы узнать, КАК СОЗДАТЬ ШАБЛОН ПАРСИНГА:

Парсинг страницы.

Чтобы разобрать отдельную страницу, выберите «News Parser» -> «Парсить страницу» в административной панели вашего сайта. В поле поиска введите URL-адрес сайта и нажмите кнопку «Парсить страницу». Откроется визуальный конструктор. В визуальном конструкторе выберите контент и нажмите кнопку «Создать черновик поста». Черновик будет автоматически создан, и вы сможете отредактировать его в редакторе постов. Если все устраивает, вы можете просто опубликовать этот пост или отредактировать его по своему усмотрению.

Посмотрите это короткое видео, чтобы узнать, КАК СПАРСИТЬ ОДНУ СТРАНИЦУ с помощью плагина news-parser:

Функция «Автопилот» для автоматического парсинга RSS-лент.

The autopilot function is now available to automatically parse posts from an RSS feed. Please note that the WordPress cron system (wp-cron — https://developer.wordpress.org/plugins/cron/) is used for scheduling the autopilot function. WP-Cron triggers the task scheduler only when your website receives a visit. If you experience any issues with the autopilot function not running as expected, you can add the following line to your wp-config.php file: define('ALTERNATE_WP_CRON', true); This can sometimes improve the reliability of WP-Cron.

Для настройки параметров автопилота следуйте этим шагам:

  1. Navigate to the Autopilot tab in the menu (News Parser -> Autopilot).
  2. In the Schedule Options, select the URL that corresponds to the RSS source you want to parse from.
  3. Click the Select button.
  4. Once the data is loaded, the following configuration options will become available:

    • Status: Determines whether the autopilot is active (enabled) or inactive (disabled) for this specific source.
    • Maximum Number of Posts: Set the maximum number of posts to be parsed in a single autopilot run from this source.
    • Maximum Number of Autopilot Runs: Specify the total number of times the autopilot should run for this source before it automatically stops.
    • Parsing Frequency: Define how often parsing should occur from this source. You can set intervals like hourly, daily, etc.
    • Use Original Post Creation Date: Enable this option to use the original publication date from the source post as the creation date for your parsed post. If disabled, the post will be dated when it is parsed and published on your site.
    • Filter Type: Choose the type of filtering condition to apply. Available options are Include and Exclude.
    • Filter Object: Determines which post parameter will be used as the object for filtering rules. You can select from three options:
      • URL: Filter based on the URL of the source post.
      • Title: Filter based on the title of the source post.
      • Meta: Filter based on meta data from the source post.
    • Filtering Expression: Define the words or phrases to be used for filtering. Separate words with | (OR) or & (AND). For example: apple|grape (includes posts with «apple» OR «grape») or apple&grape (includes posts with «apple» AND «grape»).

      If ‘Meta’ is selected as the Filter Object: You will need to specify the name attribute of the <meta> tag. The Filtering Expression will then be applied to the content attribute of the specified meta tag.

  5. Кроме того, в этом меню вы можете удалить ранее сохраненные шаблоны для разбора.

The Autopilot feature for automatically parsing RSS feeds has been significantly enhanced with new logging capabilities, removal of run and post limits, and more granular control over parsing behavior.

Посмотрите это короткое видео, чтобы узнать, КАК ИСПОЛЬЗОВАТЬ ФУНКЦИЮ АВТОПИЛОТА с плагином news-parser:

AI Feature

To use AI feature you need to get API key from OpenAI or from Google.
To use AI for generating content on your website, follow these instructions:
1. Set up the Open API Key:
— To setup OpenAPI key, open the wp-config.php file and add the following line to define your API key: define('NEWS_PARSER_OPENAI_API_KEY', 'your_key').
— To setup Google key, open the wp-config.php file and add the following line to define your API key: define('NEWS_PARSER_GEMINI_API_KEY','your_key').
2. Access the Visual Constructor: Go to the Visual Constructor within your website’s admin panel.
3. Select the AI Provider: In the AI tab of the Visual Constructor, you will see a list of available AI providers. Choose the desired provider from the list.
3. Generate Featured Image: In the Featured Image section, check the «Generate using AI» option if you want to generate a new featured image for your post. Select the model and enter a prompt. Use ${title} in the prompt wherever you want to insert the original title.
4. Generate Post Title: In the Post Title section, check the «Generate using AI» option if you want to generate a new title for your post. Select the model and enter a prompt. Use ${title} in the prompt wherever you want to insert the original title.
5. Generate Post Body: In the Post Body section, select the model for generating the post’s content. Enter a prompt in the request field and use ${post} where you want to include the original article’s text and you can use tag ${title} here as well.
6. Add Pipeline (Optional): If you need to modify the text using multiple requests, open the «Add Pipeline» tab. Enter the additional request text, which will automatically include the result of the previous request. Click «Add Prompt» to add this request to the pipeline. With the pipeline, you can ask the AI to review the results of the previous generation or request translation of the generated text into another language.
7. Apply AI Modifications: After configuring the AI settings for content modification, you can apply them immediately by selecting the content in the Visual Constructor and clicking the «Create Post» button. Alternatively, you can save these settings as a template for applying them during RSS parsing or when using the autopilot function.
Please note that when using AI for content generation, it requires making API requests to the OpenAI API, which will incur charges on your OpenAI account. Additionally, the AI generation process can take a significant amount of time.
By following these instructions, you can use artificial intelligence to create content for your website, whether it’s parsing individual pages, parsing from RSS feeds, or using the autopilot function.

SEO Feature

This tab contains three sections: Post Description, SEO Plugins, and Description AI Generation.

Post Description — This section displays the current post description and allows you to replace it with a custom description that you provide. To enable this feature and make the description visible in search results, you need to have an SEO plugin installed, such as Yoast SEO, and activate the SEO Integration within the plugin settings.

SEO Plugins — To utilize the SEO plugin integration, you must check the Enable SEO Integration option. Then, select your desired SEO plugin from the dropdown menu to establish the integration.

Description AI Generation — This section enables you to create and modify post descriptions using AI. When crafting your AI prompt, you can include the original post description by using the placeholder ${description}. This allows the AI to incorporate the existing description into the newly generated one if desired.

Поддержка WP-CLI

С последним обновлением была добавлена новая функция, использующая wp-cli. Эта функция позволяет пользователям активировать функцию автопилота, позволяющую автоматически разбирать и сохранять записи из RSS-лент. Функцию автопилота теперь можно использовать непосредственно из командной строки, что обеспечивает удобный способ управления этим процессом.

Для использования этой функции вам необходимо установить wp-cli и выполнить команду wp autopilot в командной строке. Кроме того, вам потребуется указать желаемый интервал, с которым должна запускаться функция автопилота, добавив дополнительный параметр wp autopilot --interval=. Это позволяет настроить частоту работы функции автопилота в соответствии с вашими конкретными потребностями.

С помощью интеграции wp-cli и новой команды «wp autopilot» управление автоматическим разбором и сохранением записей из RSS-лент становится более эффективным и удобным. Эта функция предоставляет расширенный контроль и гибкость, позволяя пользователям легко автоматизировать задачи по управлению постами.

Пример:

wp autopilot --interval=hourly<h3>Dependencies</h3>

* php-simple-html-dom-parser https://github.com/sunra/php-simple-html-dom-parser

Ошибки

Если вы обнаружите проблему, сообщите нам об этом здесь или в Discord.

Контакты

Скриншоты

Отзывы

11.02.2020 1 ответ
Plugin works nice, only one moment — seems like it doesn’t insert images inside post taking only featured image instead.
Посмотреть 1 отзыв

Участники и разработчики

«News-Parser» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:

Участники

Перевести «News-Parser» на ваш язык.

Заинтересованы в разработке?

Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.

Журнал изменений

Major Feature Update! Version 3.0.0 significantly expands plugin capabilities:

  • Manual Template Patterns: Use CSS selectors to create custom templates for precise post scraping in manual mode.
  • Enhanced AI Services: New AI integrations for advanced data extraction and analysis.
  • Dedicated AI API Keys Settings: Centralized settings page for easy management of AI API keys.
  • Sitemap Scraping: Extract website information efficiently using sitemap files.

This update offers greater flexibility and power for your scraping workflows.

The latest update includes substantial changes. Backup your site before upgrading, and test in a staging environment first.

3.0.3 — 06.05.2025

  • Fix: some bugs.

3.0.0 — 27.03.2025

  • Added: DeepSeek Ai provider
  • Added: Anthropic Ai provider
  • Added: Integration with Yoast Seo plugin to add post descriptions
  • Added: Parsing from sitemap source
  • Added: Autopilot post filtering
  • Added: Css selector template patterns
  • Fix: some bugs.

2.3.2 — 04-02-25

  • Added: Parsing TikTok embede video
  • Исправлено: некоторые ошибки.

2.3.1 — 31-01-25

  • Added: Visual Constructor shows saved template data.
  • Исправлено: некоторые ошибки.

2.3.0 — 29-01-25

  • Added: Visual Constructor shows saved template data.
  • Исправлено: некоторые ошибки.

2.2.3 — 09-12-24

  • Исправлено: некоторые ошибки.

2.2.2 — 09-12-24

  • Исправлено: некоторые ошибки.

2.2.1 — 09-12-24

  • Added: Autopilot logging system.
  • Added: Autopilot post options.
  • Исправлено: некоторые ошибки.

2.2.0 — 12-03-24

  • Added: AI Image generation.
  • Added: Google Gemini AI support.
  • Исправлено: некоторые ошибки.

2.1.1 — 12-02-24

  • Исправлено: некоторые ошибки.

2.1.0 — 18-01-24

  • Added: AI features.
  • Added: New WP-CLI command.
  • Исправлено: некоторые ошибки.

2.0.1 — 10-11-23

  • Добавленно: поддержка WP-CLI
  • Добавлено: Интернационализация.
  • Исправлено: некоторые ошибки.

2.0.0 — 11-10-23

  • Добавлено: Функции автопилота для автоматизации разбора постов.
  • Добавленно: Дополнительные настройки для постов
  • Исправлено: некоторые ошибки.

1.0.2 — 20-04-21

  • Исправлено: некоторые ошибки.

1.0.1 — 20-03-21

  • Исправлено: некоторые ошибки.

1.0.0 — 2020-02-18

  • Добавленно: Система шаблонов для парсинга
  • Добавленно: Визуальный-коструктор
  • Добавлено: Парсинг видео с YouTube.
  • Исправлено: некоторые ошибки.