Bug fix: uncommented lines from demo mode
This commit is contained in:
parent
ffe9e86357
commit
272ecf80a5
@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/python3.8
|
#!/usr/local/bin/python3.9
|
||||||
import tweepy
|
import tweepy
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
@ -43,10 +43,10 @@ def interactions():
|
|||||||
print(f'Tweet {tweet.text} by @{tweet.author.screen_name}', flush = True)
|
print(f'Tweet {tweet.text} by @{tweet.author.screen_name}', flush = True)
|
||||||
if not tweet.favorited:
|
if not tweet.favorited:
|
||||||
print('Not favourited.')
|
print('Not favourited.')
|
||||||
# api.create_favorite(tweet.id)
|
api.create_favorite(tweet.id)
|
||||||
if not tweet.retweeted:
|
if not tweet.retweeted:
|
||||||
print('Not retweeted.')
|
print('Not retweeted.')
|
||||||
# api.retweet(tweet.id)
|
api.retweet(tweet.id)
|
||||||
storeLastSeen(lastSeenFile, tweet.id)
|
storeLastSeen(lastSeenFile, tweet.id)
|
||||||
|
|
||||||
now = datetime.now()
|
now = datetime.now()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/python3.8
|
#!/usr/local/bin/python3.9
|
||||||
import tweepy
|
import tweepy
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
@ -48,7 +48,7 @@ def posting():
|
|||||||
words = generate_words()
|
words = generate_words()
|
||||||
output = f'What is {words[0]} if not {words[1]} persevering?'
|
output = f'What is {words[0]} if not {words[1]} persevering?'
|
||||||
print(output)
|
print(output)
|
||||||
# api.update_status(output)
|
api.update_status(output)
|
||||||
with open('/usr/src/app/post_log.txt', 'a') as logFile:
|
with open('/usr/src/app/post_log.txt', 'a') as logFile:
|
||||||
logFile.write(f'{datetime.now().strftime("%Y-%m-%d-%X")}: {output}\n')
|
logFile.write(f'{datetime.now().strftime("%Y-%m-%d-%X")}: {output}\n')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user