Obviously noone noticed it but: The script didn't post anything at all because some important lines were missing. I hope, I corrected everything necessary ...
This commit is contained in:
parent
b1e44ae914
commit
0c7a2341de
11
mastobot.py
11
mastobot.py
|
@ -112,14 +112,21 @@ for account in transitions:
|
|||
# Output text to stdout respect. post it to Mastodon.
|
||||
print(mastodon_text)
|
||||
|
||||
try:
|
||||
mastodon.status_post(mastodon_text, None, masto_media, True, None,spoiler_text="Twitter RT")
|
||||
|
||||
except:
|
||||
print(account['twitter_handle'] + " couldn't toot to fediverse!\n")
|
||||
continue
|
||||
|
||||
|
||||
# mastodon.status_post(mastodon_text, None, masto_media, True)
|
||||
time.sleep(2)
|
||||
|
||||
# If there are new statuses for account update the "last_id" to the newest one.
|
||||
if statuses:
|
||||
#print(account['twitter_handle'] + " : " + str(status.id))
|
||||
account['last_id'] = str(status.id)
|
||||
print(account['twitter_handle'] + " : " + str(status.id))
|
||||
#account['last_id'] = str(status.id)
|
||||
|
||||
# Write updated settings to json-file
|
||||
with open(settings_path, 'w') as fp:
|
||||
|
|
Loading…
Reference in New Issue