tg_rss_bot/update.py

19 lines
401 B
Python
Raw Normal View History

import os
from rss import RssReader
from update_manager import UpdateManager
from database import Database
from telegram import Notifier
2022-07-09 00:53:14 +00:00
from dotenv import load_dotenv
load_dotenv()
token = os.getenv('TELEGRAM_TOKEN')
db_path = os.getenv('DATABASE_PATH')
db = Database(db_path)
notifier = Notifier(token)
rss_reader = RssReader()
updater = UpdateManager(db, notifier, rss_reader)
updater.update()