In this article, we will examine the new OsEngine connector for retrieving news from RSS and Atom channels.
RSS (Really Simple Syndication) and Atom are two web content syndication formats that enable users to subscribe to updates from websites, blogs, and news resources through special aggregator programs or browsers.
1. Source Selection
When using OsEngine to fetch news in your bot, you must find a news portal with the information you are interested in, ensuring it has an RSS channel usually marked by an icon or the word RSS.
If neither is available, you can check for the channel by adding /rss to the site's URL. Accessing the RSS link in a browser will display an XML document that typically starts with the declaration of the RSS version.
Pic.1 Page with RSSchannel content on https://www.profinance.ru/econom.xml
Copy the page address for further use.
2. Connector Setup
Launch OsEngine and select Bot Station Light. Click on Connection Servers and find RSSNews in the list of connectors, then double-click on it.
In the parameters window, you only need to enter two details:
1. RSSfeedURL – to input the copied RSS feed URL. You can input multiple URLs separated by commas to fetch news from different sources.
2. Updateperiodnews (sec) – to specify the update interval for checking new entries on the site. You can gauge this by looking at the publication timestamps on the RSS feed page.
Click Connect. If the connection is successful, the connector status will change to Connect, and a log entry will show the name of the loaded channel. If any of the channels cannot be subscribed to, a message will appear, but the connector will continue to work with the connected channels.
Next, add a bot that includes News in its source list. Give it a unique name and click Accept.
Now, set the bot to receive news from a specific connector. Click the Chart button, navigate to the Control tab, and select Data settings. In the window that appears, choose RSS News and specify the number of news items to display in the program interface, then click Accept.
From this moment, the bot will receive the latest news, which will appear in a designated window. As new news items come in, they will fill the program window.
3. Important Notes
The News column contains both the title and full news from the RSS feed. This is due to not all sites adhering to standards and properly formatting their RSS pages. Instead of full news, there may just be a link to the website or an image.
Also, not all RSS feed pages that open in a browser may be loadable in OsEngine. This may be due to server settings or errors in the XML document.
Here are some reliable RSS feed addresses from popular portals that work correctly with the connector:
https://rssexport.rbc.ru/rbcnews/news/30/full.rss - RBC
https://www.profinance.ru/fond.xml - Stock market news from profinance.ru
https://www.profinance.ru/econom.xml - Economy news from profinance.ru
https://www.finam.ru/analysis/conews/rsspoint/ - Company news from Finam
https://bonds.finam.ru/news/today/rss.asp - Bond news from Finam
https://www.kommersant.ru/rss-list - List of RSS feeds from Kommersant
Good luck with your algorithms!
OsEngine: https://github.com/AlexWan/OsEngine
OsEngine Support: https://t.me/osengine_support_english