那就自建个机器人吧,项目地址:https://github.com/iovxw/rssbot
在Telegarm中,搜索栏粘贴 @botfather
然你就打开了botfarther的聊天对话框,输入
/newbot
回车发送,botfarther会反馈
Alright, a new bot. How are we going to call it? Please choose a name for your bot.
输入你要创建的bot名字。例如zhujiwiki_bot,回车发送
Done! Congratulations on your new bot. ……
Use this token to access the HTTP API:
xxx:xxx
我们还可以给自己的机器人添加个菜单,这一步是非必须的
输入/mybots
找到自己的bot,选择他,然后选择Edit Bot,选择Edit Commands就可以输入你的指令了例如:
rss – 显示当前订阅的 RSS 列表,加 raw 参数显示链接
sub – 订阅一个 RSS: /sub http://example.com/feed.xml
unsub – 退订一个 RSS: /unsub http://example.com/feed.xml
unsubthis – 使用此命令回复想要退订的 RSS 消息即可退订, 不支持 Channel
export – 导出为 OPML
rssbot已编译最新版是v2.0.0-alpha.11:https://github.com/iovxw/rssbot/releases
这两个我们任选一个即可
TELEGRAM-BOT-TOKEN替换为上面申请的HTTP API
这时我们的机器人已经跑起来了,但是我们需要让机器人在后台运行,方法很多。
1.使用tmux或screen
2.使用nohup命令
nohup ./rssbot TELEGRAM-BOT-TOKEN > /dev/null 2>&1 &
3.加入systemctl进程守护(终极疗法)
1、把订阅机器人设为另一个频道的管理员
2、在机器人中发送/sub @example https://lowendtalk.com/categories/offers/feed.rss
,即可订阅offer专区。订阅
/sub https://lowendtalk.com/categories/offers/feed.rss
/sub https://lowendtalk.com/categories/offers/feed.rss
/sub @example https://lowendtalk.com/categories/offers/feed.rss
退订
/unsub https://lowendtalk.com/categories/offers/feed.rss
/unsub https://lowendtalk.com/categories/offers/feed.rss
/unsub @example https://lowendtalk.com/categories/offers/feed.rss
查看列表
/rss
/rss
/rss @example
显示 RSS 链接
/rss raw
/rss raw
/rss @example raw