Now reposing already posted tweets, since bots do that all the time.

pull/1/head v1.3
Ayush Sharma 2018-10-07 16:53:36 +05:30
parent c3b7649c8f
commit d984778d8b
1 changed files with 2 additions and 4 deletions

View File

@ -91,9 +91,7 @@ def tootTheTweet(tweet):
tweet_check_file = Path(tweet_check_file_path)
if tweet_check_file.is_file():
helpers._info('tootTheTweet() => Tweet ' + tweet_id + ' was already posted. Skipping...')
return False
helpers._info('tootTheTweet() => Tweet ' + tweet_id + ' was already posted. Reposting...')
else:
@ -101,7 +99,7 @@ def tootTheTweet(tweet):
tweet_check.write(tweet['text'])
tweet_check.close()
helpers._info('tootTheTweet() => New tweet ' + tweet_id + ' => "' + tweet['text'] + '".')
helpers._info('tootTheTweet() => New tweet ' + tweet_id + ' => "' + tweet['text'] + '".')
response = requests.post(
url=host_instance + '/api/v1/statuses', data=data, headers=headers)