Fetch rss and send the latest update to telegram.
Project description
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 update
to 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,]
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/"
[[feeds]]
name = "Feed example local"
source = "c:\\incoming\\atom10.xml"
save_bandwith = false
footer = false
[template_data]
author = "Author"
source = "Source"
- 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>
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
telegram-rss-0.5.0.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for telegram_rss-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | abc03a4743e59b0097992c215a745a8bf50d1eb319dba0bee5d9b4b1ab83e373 |
|
MD5 | 397e07633e6d15e1238f6deac87aca8a |
|
BLAKE2b-256 | 0e174b5edd7d378f615a1d18e3a2857af5544b5254cf6a800fd093d43a20ee61 |