A telegram bot to read RSS feeds

Overview

Telegram bot to fetch RSS feeds

This is a telegram bot that fetches RSS feeds in regular intervals and send it to you. The feed sources can be added or removed by just sending messages to the bot. Additionally, the feed URLs will be captured to archive.org.

Bot setup

Create a bot account with telegram

Use the @botfather bot of telegram. Refer its documentation.

Create an sqlite database with the following script

CREATE TABLE IF NOT EXISTS "sources" (
	"userid"	TEXT NOT NULL,
	"url"	TEXT NOT NULL,
	"last_updated"	INTEGER NOT NULL,
	PRIMARY KEY("url","userid")
);

Create an .env file with the following content

TELEGRAM_BOT_TOKEN=XXXXXXXXXXX
FEED_DATABASE=reader.db
FEED_UPDATE_INTERVAL=1800

Make sure to edit the values as per your environment. FEED_UPDATE_INTERVAL is in minutes. So 1800 = 30*60. That is, fetch the feeds in every 30 minutes

Install requirements

pip install -r requirements.txt

Start the bot

python bot.py

Bot commands

  • /add feedurl to add a new RSS/Atom feed.
  • /remove feedurl to remove an RSS/Atom feed subscription.
  • /list to list alll subscribed feeds.
  • /help to get the help
  • /archive to archive a given link in archive.org
You might also like...
A telegram bot which can show you the status of telegram bot

BotStatus-Ts-Bot An open source telegram Bot Status bot For demo you can check here The status is updated in every 1 hour About Bot This is a Bot stat

Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

🎶 Veez Music Bot Music bot for playing music on telegram voice chat group. Requirements 📝 FFmpeg NodeJS nodesource.com Python 3.7+ PyTgCalls 🧪 Get

A simple telegram voting bot based on the python-telegram-bot api.

A simple telegram voting bot based on the python-telegram-bot api. *To make it more easy to use, I might make a C++ code in the future so you don't ha

An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. This is Also The Source Code of The Bot Which is Being Used In @SafoTheBot Group! ❤️

Telegram Video Player Bot (Beta) An Telegram Bot By @AsmSafone To Stream Videos in Telegram Voice Chat. Special Features Supports Live Streaming From

Telegram bot implementing Lex Arcana using python-telegram-bot library.
Telegram bot implementing Lex Arcana using python-telegram-bot library.

Lex Arcana Telegram Bot 🤖 Telegram bot implementing Lex Arcana using python-telegram-bot library. This bot was evaluated for the course "Computer Eng

A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

A Telegram Filter Bot, Support Unlimited Filter. Also, The Bot can auto-filter telegram File | video

A Powerful telegram giveawayz bot based on the python-telegram-bot API
A Powerful telegram giveawayz bot based on the python-telegram-bot API

GiveawayZ Bot A Powerful telegram giveawayz bot based on the python-telegram-bot API. Powered by Team Zyntax and Team DFX Developed by @Zycho-Dev A pr

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.
Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Asad Alexa VC Bot Is A Telegram Bot Project That's Allow You To Play Audio And Video Music On Telegram Voice Chat Group.

Comments
  • Script starts but produces errors for any actions taken in Telegram

    Script starts but produces errors for any actions taken in Telegram

    I'm new to Python and I've played around with multiple Python Telegram RSS scripts, this one I believe is the best in the world if it can actually work.

    I've confirmed communications with the Telegram Channel I've created using another Python script to send messages to it.

    When I run bot.py I'm getting the following error on any action from /help, /list /add feed, etc.

    2022-03-16 22:18:06,653 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception. Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 442, in process_update handler.handle_update(update, self, check, context) File "/usr/local/lib/python3.6/site-packages/telegram/ext/handler.py", line 160, in handle_update return self.callback(update, context) File "bot.py", line 68, in text text_received = update.message.text AttributeError: 'NoneType' object has no attribute 'text' 2022-03-16 22:18:06,657 - telegram.ext.dispatcher - ERROR - No error handlers are registered, logging exception. Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/telegram/ext/dispatcher.py", line 442, in process_update handler.handle_update(update, self, check, context) File "/usr/local/lib/python3.6/site-packages/telegram/ext/handler.py", line 160, in handle_update return self.callback(update, context) File "bot.py", line 68, in text text_received = update.message.text AttributeError: 'NoneType' object has no attribute 'text'

    Steps:

    • Git cloned script.
    • Ran install for requirements.
    • Created SQLite DB named reader.db
    • Executed SQL statement to create the table
    • created .env and fill in all the variables.
    • Gave all py files execution permisisons.
    • Ran bot.py
    • Recieved the following output:
    • 2022-03-16 22:04:27,410 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts 2022-03-16 22:04:27,418 - apscheduler.scheduler - INFO - Added job "fetch_feeds" to job store "default" 2022-03-16 22:04:27,418 - apscheduler.scheduler - INFO - Scheduler started
    • When typing any command into Telegram Channel, the errors are produced in the logs.
    • Adding a feed does not update the database, and throws the above error.

    System Rocky Linux 8.5 Python 3.6.8

    Installed Modules: [root@localhost telegram-rss-reader]# pip3 list Package Version


    appdirs 1.4.4 APScheduler 3.6.3 asgiref 3.4.1 async-lru 1.0.2 attrs 20.3.0 backports.zoneinfo 0.2.1 beautifulsoup4 4.9.3 bleach 3.3.0 cachetools 4.2.2 certifi 2020.12.5 chardet 3.0.4 click 7.1.2 configobj 5.0.6 cssselect 0.9.2 dbus-python 1.2.4 decorator 4.2.1 distlib 0.3.1 dj-database-url 0.5.0 Django 3.2.12 feedparser 6.0.2 filelock 3.0.12 gpg 1.13.1 html5lib 0.999999999 idna 2.5 importlib-metadata 3.7.0 importlib-resources 5.1.1 isc 2.0 Jinja2 2.11.3 lazy-object-proxy 1.5.2 libcomps 0.1.16 lxml 4.2.3 MarkupSafe 1.1.1 nftables 0.1 packaging 20.9 perf 0.1 pexpect 4.3.1 pip 21.3.1 pipenv 2022.1.8 platformdirs 2.4.0 ply 3.9 psutil 5.4.3 psycopg 3.0.10 psycopg2-binary 2.9.3 ptyprocess 0.5.2 pyaes 1.6.1 pyasn1 0.4.8 pycairo 1.16.3 pydbus 0.6.0 PyGObject 3.28.3 pyparsing 2.4.7 Pyrogram 1.0.1 PySocks 1.7.1 python-dateutil 2.8.1 python-dotenv 0.19.2 python-linux-procfs 0.6.3 python-telegram-bot 13.3 pytz 2021.1 pytz-deprecation-shim 0.1.0.post0 pyudev 0.21.0 PyYAML 3.12 regex 2020.11.13 requests 2.20.0 rpm 4.14.3 rsa 4.8 savepagenow 1.1.1 selinux 2.9 sepolicy 1.1 setools 4.3.0 setroubleshoot 1.1 setuptools 59.6.0 sgmllib3k 1.0.0 six 1.15.0 slip 0.6.4 slip.dbus 0.6.4 sos 4.1 soupsieve 2.2 SQLAlchemy 1.3.23 sqlparse 0.4.2 SSSDConfig 2.5.2 syspurpose 1.28.21 systemd-python 234 telebot 0.0.4 telegram-rss 0.8.1 Telethon 1.24.0 toml 0.10.2 tornado 6.1 typed-ast 1.4.2 typing_extensions 4.1.1 tzdata 2021.5 tzlocal 2.1 urllib3 1.24.2 virtualenv 20.4.2 virtualenv-clone 0.5.7 wcwidth 0.2.5 webencodings 0.5.1 wrapt 1.12.1 zipp 3.4.0

    If you can provide a fix, I'll toss you a few dollars over PayPal.

    opened by J-Wick4 7
Owner
Santhosh Thottingal
Principal Software Engineer at @wikimedia foundation. Designer of Manjari, Chilanka fonts. Maintains @smc fonts. #NLP, #Typography, #Malayalam
Santhosh Thottingal
A telegram mirror bot with an integrated RSS feed reader.

About What is this repo? This is a slightly modified fork which includes some extra features & memes added to my liking. How's this different from the

null 11 May 15, 2022
null 1 Feb 18, 2022
Tools to download and aggregate feeds of vaccination clinic location information in the United States.

vaccine-feed-ingest Pipeline for ingesting nationwide feeds of vaccine facilities. Contributing How to Configure your environment (instructions on the

Call the Shots 26 Aug 5, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram VCVideoPlayBot An Telegram Bot By @ZauteKm To Stream Videos in Telegram Voice Chat. NOTE: Make sure you have started a VoiceChat in your Grou

Zaute 20 Oct 21, 2022
Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram media.

SUBIN 449 Dec 27, 2022
A website application running in Google app engine, deliver rss news to your kindle. generate mobi using python, multilanguages supported.

Readme of english version refers to Readme_EN.md 简介 这是一个运行在Google App Engine(GAE)上的Kindle个人推送服务应用,生成排版精美的杂志模式mobi/epub格式自动每天推送至您的Kindle或其他邮箱。 此应用目前的主要

null 2.6k Jan 6, 2023
Spodcast is a caching Spotify podcast to RSS proxy

Spodcast Spodcast is a caching Spotify podcast to RSS proxy. Using Spodcast you can follow Spotify-hosted netcasts/podcasts using any player which sup

Frank de Lange 260 Jan 1, 2023
Read manga from your favourites websites on telegram.

tg-manga-bot Read manga from your favourites websites on telegram. Current Development Bot @idkpythonbot Telegram Channel tg_manga_bot Commands start

Daniel Rivero 41 Dec 22, 2022
This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

Anonymous 27 Oct 28, 2022