some cosmetics
This commit is contained in:
pare
6817cfdc58
commit
6a5dd85774
S'han modificat 1 arxius amb 5 adicions i 7 eliminacions
12
mastotuit.py
12
mastotuit.py
|
@ -113,7 +113,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
api_key, api_key_secret, access_token, access_token_secret = twitter_config()
|
api_key, api_key_secret, access_token, access_token_secret = twitter_config()
|
||||||
|
|
||||||
publish = 0
|
publish = False
|
||||||
logged_in = False
|
logged_in = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -146,9 +146,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
row = cur.fetchone()
|
row = cur.fetchone()
|
||||||
if row == None:
|
if row == None:
|
||||||
publish = 1
|
publish = True
|
||||||
else:
|
|
||||||
publish = 0
|
|
||||||
|
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
|
@ -163,14 +161,14 @@ if __name__ == '__main__':
|
||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
if publish == 1:
|
if publish:
|
||||||
|
|
||||||
toot_text = str(title)+'\n'
|
toot_text = f'{title}\n'
|
||||||
|
|
||||||
toot_text = cleanhtml(toot_text)
|
toot_text = cleanhtml(toot_text)
|
||||||
toot_text = unescape(toot_text)
|
toot_text = unescape(toot_text)
|
||||||
|
|
||||||
toot_text += ' ' + str(link)
|
toot_text = f'{toot_text} {link}'
|
||||||
|
|
||||||
print("Tooting...")
|
print("Tooting...")
|
||||||
print(toot_text)
|
print(toot_text)
|
||||||
|
|
Loading…
Referencia en una nova incidència