handle tokens being revoked
This commit is contained in:
parent
3de328299a
commit
9f8326ae06
1 changed files with 4 additions and 1 deletions
5
run.py
5
run.py
|
@ -33,7 +33,10 @@ for row in dc.fetchall():
|
||||||
posted = False
|
posted = False
|
||||||
if len(j['posts']) > 0 and not (len(j['posts']) == 1 and int(j['posts'][0]['timestamp']) == int(row['latest_post'])):
|
if len(j['posts']) > 0 and not (len(j['posts']) == 1 and int(j['posts'][0]['timestamp']) == int(row['latest_post'])):
|
||||||
#they've made some new posts, log in to masto
|
#they've made some new posts, log in to masto
|
||||||
client = Mastodon(client_id=row['client_id'], client_secret=row['client_secret'], access_token=row['secret'], api_base_url=row['instance'])
|
try:
|
||||||
|
client = Mastodon(client_id=row['client_id'], client_secret=row['client_secret'], access_token=row['secret'], api_base_url=row['instance'])
|
||||||
|
except:
|
||||||
|
continue
|
||||||
for post in j['posts']:
|
for post in j['posts']:
|
||||||
if post['senderData']['id'] == False:
|
if post['senderData']['id'] == False:
|
||||||
sender = "(anonymous)"
|
sender = "(anonymous)"
|
||||||
|
|
Loading…
Reference in a new issue