diff --git a/tootbot.py b/tootbot.py index c35aa41..3804f44 100755 --- a/tootbot.py +++ b/tootbot.py @@ -9,11 +9,16 @@ import requests import re import sqlite3 from datetime import datetime, date, time, timedelta +import time +import random if len(sys.argv) < 4: print("Usage: python3 tootbot.py twitter_account mastodon_login mastodon_passwd mastodon_instance") sys.exit(1) +sleep_time = random.randomin(0, 5 * 60) +time.sleep(sleep_time) + # sqlite db to store processed tweets (and corresponding toots ids) sql = sqlite3.connect('tootbot.db') db = sql.cursor()