github Rongronggg9/RSS-to-Telegram-Bot v1.6.0
Switching to MTProto, OPML support, and more (v1.6.0)

latest releases: v2.8.0, v2.7.0, v2.6.0...
2 years ago

BREAKING CHANGES

  • The telegram bot library has been migrated from python-telegram-bot (which uses HTTP Bot API and is synchronous) to telethon (which uses MTProto Bot API and is asynchronous)
    • However, to use MTProto Bot API, an API key is needed. The bot has 7 built-in API keys (collected from the Internet) and in most cases, it should not be unable to log in. But if so, please obtain your own API key
      (see docker-compose.yml.sample for details)

Additions

  • Thanks to the migration of the Telegram bot library, the bot can now connect to its DC directly, need not detour through the HTTP Bot API, and keep polling to get new messages. Which makes the bot receive and reply to messages more rapidly and lightweight. Even if the HTTP Bot API is down, the bot can still run unaffectedly.
    (more details: Advantages of MTProto over Bot API, MTProto vs HTTP Bot API)
  • Support parsing more HTML elements
    • <iframe>
    • <video><source><source>...</video>
    • <code>
    • <pre>
  • Support OPML importing and exporting
  • Support sending too-long post via Telegraph (env variable TELEGRAPH_TOKEN must be set)
  • Support using Redis as DB
    • Note: This is a workaround for deploying the bot on railway.app, will be dropped in the future
  • Support arm64 (docker build)
  • Support resending a message using a media relay server if Telegram cannot send a message with media due to Telegram server instability or network instability between the media server and Telegram server
  • Support colored logging
  • docker-compose.yml.sample
  • /version command to check bot version
  • Automatically use proxy if global proxy (env variable SOCKS_PROXY/HTTP_PROXY) set

Enhancements

  • Assign feed monitoring tasks to every minute, instead of executing all at once each DELAY
    • Thus, env variable DELAY can only be 60~3600
    • Note: env variable DELAY will be deprecated in the future
  • Recognize a post by its guid/id instead of link
  • Simplify the output of /list
  • Bump Python to 3.9 (docker build)
  • Minor fixes

切换到 MTProto、OPML 支持和更多 (v1.6.0)

重大变更

  • 与 Telegram 交互的库由使用 HTTP Bot API 的同步库 python-telegram-bot 改为使用 MTProto Bot API 的异步库 telethon
    • 这引入了 API key 的需求,程序已经内置了 7 个公开的 API key,通常情况下不应无法登入。如果无法登入,可以自己申请 API key (详见 docker-compose.yml.sample 中的说明)

新特性

  • 由于 Telegram bot 库的替换,bot 可以直接连接到 bot 所属的 DC,不需绕经 HTTP Bot API;也不需轮询获得消息更新,它在接收及发送消息方面都更为迅速,资源占用也更低; 即使 HTTP Bot API 宕机,bot 也可以正常工作 (详见 Advantages of MTProto over Bot APIMTProto vs HTTP Bot API)
  • 支持更多元素的解析
    • <iframe>
    • <video><source><source>...</video>
    • <code>
    • <pre>
  • 支持 OPML 导入导出
  • 支持超长文章通过 Telegraph 发送 (必须先设置 TELEGRAPH_TOKEN 环境变量)
  • 支持使用 redis 作为数据库
    • 注意:这是为了在 railway.app 上部署而设计的变通解决方案,未来很可能丢弃
  • 支持 arm64 (docker 构建)
  • 支持在由于 Telegram 服务器不稳定或 Telegram 服务器与媒体服务器之间的网络连接不稳定而导致 Telegram 无法发出带有媒体的消息时,使用媒体反代服务器重新发送。
  • 支持日志着色
  • docker-compose.yml.sample
  • 用于检查 bot 版本的 /version 命令
  • 如果设置了全局代理 (环境变量 SOCKS_PROXY/HTTP_PROXY),会使用它们

增强

  • 将 feed 监视任务分配到每分钟,而不是每次 DELAY 一次性全部执行
    • 因此,环境变量 DELAY 将只能被设置为 60~3600
    • 注意:环境变量 DELAY 未来将被弃用
  • 使用 guid/id 来辨识一个 post,而不是 link
  • 简化了 /list 的输出
  • 升级为 Python 3.9 (docker 构建)
  • 次要的修复

Don't miss a new RSS-to-Telegram-Bot release

NewReleases is sending notifications on new releases.