From 166ecec1201d2c8f45ce63589a69e1f46d39615f Mon Sep 17 00:00:00 2001 From: m33m33 <m33@tok715.net> Date: Sat, 15 Aug 2020 19:16:42 +0200 Subject: [PATCH] Make it work with RSS feeds --- tootbot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tootbot.py b/tootbot.py index e72cd66..1f9069c 100755 --- a/tootbot.py +++ b/tootbot.py @@ -3,6 +3,7 @@ import sys import re import sqlite3 from datetime import datetime, timedelta +from time import sleep import feedparser from mastodon import Mastodon @@ -136,7 +137,8 @@ for t in reversed(d.entries): db.execute("INSERT INTO tweets VALUES ( ? , ? , ? , ? , ? )", (t.id, toot["id"], source, mastodon, instance)) sql.commit() + sleep(0.1) else: print(".",end='') -print("Bye!") +print("done.") -- GitLab