handle it for realsies now
This commit is contained in:
parent
9f8326ae06
commit
de87d7761b
1 changed files with 7 additions and 4 deletions
3
run.py
3
run.py
|
@ -51,10 +51,13 @@ for row in dc.fetchall():
|
||||||
posted = True
|
posted = True
|
||||||
|
|
||||||
toot = "Curious Cat user {} asks: {}\n\nMy answer: {}\n\nhttps://curiouscat.me/{}/post/{}".format(sender, post['comment'], post['reply'], row['cc'], post['id']) #TODO: what if this is over 500 characters?
|
toot = "Curious Cat user {} asks: {}\n\nMy answer: {}\n\nhttps://curiouscat.me/{}/post/{}".format(sender, post['comment'], post['reply'], row['cc'], post['id']) #TODO: what if this is over 500 characters?
|
||||||
|
try:
|
||||||
if settings['cw']:
|
if settings['cw']:
|
||||||
client.status_post(toot, spoiler_text="Curious Cat post")
|
client.status_post(toot, spoiler_text="Curious Cat post")
|
||||||
else:
|
else:
|
||||||
client.status_post(toot)
|
client.status_post(toot)
|
||||||
|
except:
|
||||||
|
continue
|
||||||
c.execute("UPDATE data SET last_check = %s, time_between_checks = %s, latest_post = %s", (t, cfg['min_time_between_checks'], j['posts'][0]['timestamp']))
|
c.execute("UPDATE data SET last_check = %s, time_between_checks = %s, latest_post = %s", (t, cfg['min_time_between_checks'], j['posts'][0]['timestamp']))
|
||||||
if not posted:
|
if not posted:
|
||||||
#we checked, and they haven't made a post
|
#we checked, and they haven't made a post
|
||||||
|
|
Loading…
Reference in a new issue