handle tokens being revoked

This commit is contained in:
Lynne Megido 2018-11-17 15:34:52 +10:00
부모 3de328299a
커밋 9f8326ae06
로그인 계정: lynnesbian
GPG 키 ID: FB7B970303ACE499

5
run.py
파일 보기

@ -33,7 +33,10 @@ for row in dc.fetchall():
posted = False
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
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']:
if post['senderData']['id'] == False:
sender = "(anonymous)"