Code Monkey home page Code Monkey logo

telegram-robot-rss's Introduction

RobotRSS - A Telegram RSS Bot

RobotRss Logo

Github python Github python GitHubissues GitHub license

Description

RobotRSS is an RSS Bot for the Telegram Messenger. Subscribe to different news channels and stay up-to-date. Receive instant messages in your Messenger app when websites are updated, e. g. on news pages, blogs or audio/video logs.

The latest stable release and release notes can be found here.

Deploy to Heroku:

Deploy to Heroku

Usage

RobotRSS has an easy-to-use user interface to get started. Write the official @RobotRssBot via telegram. Use the following commands to manage your subscriptions:

Controls
/start - Activates the bot. If you have subscribed to RSS feeds, you will receive news from now on
/stop - Deactivates the bot. You won't receive any messages from the bot until you activate the bot again using the start comand

RSS Management
/add <url> <entryname> - Adds a new subscription to your list.
/remove <entryname> - Removes an exisiting subscription from your list.
/get <entryname> [optional: <count 1-10>] - Manually parses your subscription, sending you the last elements.
/list - Shows all your subscriptions as a list.

Other
/about - Shows some information about RobotRSS Bot
/help - Shows the help menue

Feature Request and Contributing

You have suggestions for improvements or features you miss? You are welcome to express all your wishes here. Just create a new Issue and it will be taken care of quickly!

If you are a developer yourself, you can also contribute code! Further information will follow shortly.

Installation

The source code of RobotRSS is Open Source and openly accessible and editable. If you would like to use your own bot as newsfeed reader, you will find everything you need to install it here. It is recommended to run the bot in a docker container. You can find the latest, stable Docker Image on Dockerhub. If you make changes to the source code, you can easily create a new image of your version using the dockerfile located in the project folder.

Create a credentials file

First, you must tell RobotRSS which bot the service is allowed to communicate with. Create a new telegram bot or use an existing one. All you need is the Bot's Token from Telegram. You can receive one from Telegrams Botfather.

Edit the credentials.json file located at /resources/credentials.json.

{
  "telegram_token": "INSERT TOKEN",
  "update_interval": 300
}

Install Dependencies using pip

You can easily install all needed Dependencies using pip. Navigate into the project directory and run pip install -r requirements.txt. If you prefer installing all Dependencies manually you can find a detailed list of all needed packages at the "Dependencies" Section at the bottom of the page.

Create a Docker Image

You can easily run RobotRSS inside a Docker Container. The Dockerfile can be found in the project directory. Run docker build --tag "RobotRSS:latest" . to create a new Docker Image based on the current code.

You can also pull the latest image from Dockerhub using docker pull cynthek/RobotRSS:latest.

To start your docker container use the following commands, passing BOT_TOKEN and optional UPDATE_INTERVAL environment variable to the container:

docker run -itd --name "your-container-name" -e BOT_TOKEN="Enter your token" robotrss:latest
# or use
docker run -itd --name "your-container-name" -e BOT_TOKEN="Enter your token" -e UPDATE_INTERVAL=<Number in Minutes> robotrss:latest

UPDATE_INTERVAL is set to 300 per default, updating feeds of subscribers every 5 minutes (300 sec).

Python Version

RobotRSS has been successfully tested with Python 2.7 .

Dependencies

All Dependencies can be found in the requirements.txt file in the project directory.

Motivation

This script was originally developed by Christian Bargmann for practice purposes with Python.

telegram-robot-rss's People

Contributors

a5r0n avatar cbrgm avatar em92 avatar gdalmau avatar jlelse avatar soebb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram-robot-rss's Issues

Rss content

i am only getting rss headings to my telegram..i want rss content also..so how to edit that for getting rss content too ?

Autorun

Hello, how can i make autorun of certain rss for all users when they start to talk with bot and make it update after without writing of any commanda. thank you.

Add match options

Hello! Iโ€™d like to suggest to add options for match and print only needed rows from RSS, so, for example i need to see news only about python in newspaper (abstract).

How it looks:
i suggest needed entryname and add PCRE parameter

/add https://example.com/programming/rss programming
/match programming /^python/ig

and after all i will receive only news about python

[Bug] Database Locking Error

Sometimes there's a bug where the thread pool is locking the database. I need to fix that soon. This is just a reminder for myself.

File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/workspace/util/processing.py", line 32, in run
self.parse_parallel(queue=url_queue, threads=4)
File "/workspace/util/processing.py", line 41, in parse_parallel
pool.map(self.update_feed, queue)
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 253, in map
return self.map_async(func, iterable, chunksize).get()
File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 572, in get
raise self._value
OperationalError: database is locked

Automatic RSS feed updates not working

Hi ,

WHen I try to manually query an added rss stream I can get it to display last xx items with the /get command.

However, automatic RSS stream updates are not working at all !
I can see in the docker logs it tries to parse the streams but nothing is found :

Finished updating! Parsed 8 rss feeds in 0:00:01.718728 !
Finished updating! Parsed 8 rss feeds in 0:00:01.616678 !
Finished updating! Parsed 8 rss feeds in 0:00:01.828223 !
Finished updating! Parsed 8 rss feeds in 0:00:01.518962 !
Finished updating! Parsed 8 rss feeds in 0:00:01.562186 !

I am 100% sure the rss streams have new content, but I get 0 updates from the bot .

What is wrong ?

Support for channels

Hello.
The @RobotRssBot work on channels? If it's possible. Are there any restrictions(limit) regarding subscriptions?

Greets,
AlvesR0.

unsupported form

Sorry! It seems like 'https://www.lowendtalk.com/discussions/feed.rss' doesn't provide an RSS news feed.. Have you tried another URL from that provider?

Make it more inteligent

Bot should be able to receive a website, rather than the rss, and check if the html rss tag exists, to grab it.

Re-designing /list output

Planning on re-designing the output format of /list command. Maybe use inline query or something?

RSS Feed not working

Strangely this is not working in the App:
/add http://www.stwh-portal.de/mensa/index.php?wo=2&wann=1&format=rss Hauptmensa
Also this is not working:
/add http://www.stwh-portal.de/mensa/index.php?wo=2&wann=1 Hauptmensa
However, when I open the page in Firefox, it instantly recognizes this as RSS-Feed.
Any help?!

Can i modify the code by myself?

As I want to add download youtube video function inside the script, after I ran, it will have an operationalerror: attempt to write a readonly database.
So, is it not allow for us to modify the code ?

Sorry about my bad english ..

Adding language support

I want to add language support to Robot Rss. At the moment only english language is available, but i'm want to add german, polish, spanish and other languages too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.