From 591c5b943ae7beb055406ea5c3edc0aacf39b676 Mon Sep 17 00:00:00 2001 From: Adnan Ahmad Date: Mon, 5 Apr 2021 08:40:37 +0530 Subject: [PATCH] Fixed Typo --- rss.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rss.py b/rss.py index 83af8fd..7edec21 100644 --- a/rss.py +++ b/rss.py @@ -23,20 +23,20 @@ check_interval = int(os.environ.get("INTERVAL", 5)) max_instances = int(os.environ.get("MAX_INSTANCES", 5)) -if db.get_link("feed_url") == None: - db.update_link("feed_url", "*") +if db.get_link(feed_url) == None: + db.update_link(feed_url, "*") app = Client(":memory:", api_id=api_id, api_hash=api_hash, bot_token=bot_token) def check_feed(): FEED = feedparser.parse(feed_url) entry = FEED.entries[0] - if entry.id != db.get_link("feed_url"): + if entry.id != db.get_link(feed_url).link: # ↓ Edit this message as your needs. message = f"**{entry.title}**\n```{entry.link}```" try: app.send_message(log_channel, message) - db.update_link("feed_url", entry.id) + db.update_link(feed_url, entry.id) except FloodWait as e: print(f"FloodWait: {e.x} seconds") sleep(e.x) @@ -50,4 +50,4 @@ def check_feed(): scheduler = BackgroundScheduler() scheduler.add_job(check_feed, "interval", seconds=check_interval, max_instances=max_instances) scheduler.start() -app.run() \ No newline at end of file +app.run()