diff --git a/mastotuit.py b/mastotuit.py index fdd2fe7..978bda1 100644 --- a/mastotuit.py +++ b/mastotuit.py @@ -113,7 +113,7 @@ if __name__ == '__main__': api_key, api_key_secret, access_token, access_token_secret = twitter_config() - publish = 0 + publish = False logged_in = False try: @@ -146,9 +146,7 @@ if __name__ == '__main__': row = cur.fetchone() if row == None: - publish = 1 - else: - publish = 0 + publish = True cur.close() @@ -163,14 +161,14 @@ if __name__ == '__main__': conn.close() ########################################################### - if publish == 1: + if publish: - toot_text = str(title)+'\n' + toot_text = f'{title}\n' toot_text = cleanhtml(toot_text) toot_text = unescape(toot_text) - toot_text += ' ' + str(link) + toot_text = f'{toot_text} {link}' print("Tooting...") print(toot_text)