Telegram RSS
Fetch rss and send the latest update to telegram. This project is still in active development
Usage
Setup
- Make sure you have python installed.
- Open command line.
- Install
pip install --upgrade telegram-rss - Run
python -m telegram_rss - Add bot token, feeds, user's id, and/or channel's id inside telegram-rss/config.toml
- Run
python -m telegram_rss updateto send initial update (use personal id to send initial update)
If your system support entry_points, you can execute python -m telegram_rss with telegram-rss.
Checking update
Run python -m telegram_rss update to check and send the latest feeds
Example config
bot_token = "987654321:ASDASDASD-1sda2eas3asd-91sdajh28j"
env_token = "TOKEN"
users = [ 123456789,]
channels = [ -123456789,]
groups = [ 1234567890,]
web_page_preview = true
message_delay = 0.05
read_more_button = "Read more"
[[feeds]]
name = "Feed example online"
source = "http://feedparser.org/docs/examples/atom10.xml"
footer_link = "http://feedparser.org/docs/"
channels = [ -123456789,]
only_today = true
[[feeds]]
name = "Feed example local"
source = "c:\\incoming\\atom10.xml"
save_bandwith = false
only_today = false
users = [ 987654321,]
groups = [ 111111111,]
footer = false
[template_data]
author = "Author"
source = "Source"
- Send feed if published today (when we checked)
only_today = true. - Disable web preview in chat by
web_page_preview = false. - If you don't want read_more_button under the message, set
read_more_button = "". - Don't set message_delay too low, it can be detected as spam.
Template
template.html is loaded using jinja2, Learn more.
Default template is
<a href="{{ entry.link }}">{{ entry.safe_title }}</a>
<i>{{ author }}</i>: <b>{{ entry.author }}</b>
{{ entry.safe_description }}
<i>{{ source }}</i>: <a href="{{ channel.link }}">{{ channel.safe_title }}</a>
More about objects in template
How to get token
Just create a new bot account using @BotFather. Don't forget to add the bot as channel's admin
How to get ids
Send / forward a message (user or channel) to @JsonDumpBot
Template objects
entry
class Entry:
title: str
link: str
description: str
author: str
published: Optional[str]
time: Optional[datetime]
safe_title: str
safe_description: str
channel
class Channel:
title: str
link: str
description: str
safe_title: str
safe_description: str
Metadata
Release files for telegram-rss 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| telegram-rss-0.8.1.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| telegram_rss-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.3 kB
Release files / telegram-rss-0.8.1.tar.gz
| Download URL | telegram-rss-0.8.1.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c727072f801ecf2b1c42de6db37fc6f65209ca600e954b2961ea7cdf94aa31a6
|
|
BLAKE2b-256 checksum How to use checksums |
9851c6462b3522e217c401e9529f692d0078575ac2b8f2c01c1bc458ff5d2a71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.7.10 Linux/5.4.0-1040-azure
|
Release files / telegram_rss-0.8.1-py3-none-any.whl
| Download URL | telegram_rss-0.8.1-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e40f8135b312c2733395b799caa746812749be07b7403f9e7cae13e59ea2c553
|
|
BLAKE2b-256 checksum How to use checksums |
eb47110c1c7c46adf1d402c4fd8a51a9187b599b6c8129d64e8ebd6d3491f167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.5 CPython/3.7.10 Linux/5.4.0-1040-azure
|