Browse Source

Wait for random interval before tooting

master
Felix Ableitner 4 years ago
parent
commit
d43d2aa3e2
  1. 5
      tootbot.py

5
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()

Loading…
Cancel
Save