I made a twitter bot that tweets every 15 minutes when I run the bot locally it works fine but when I run on pythonanywhere server it updates the twitter status but the tweets does not show up in Twitter search. I post the tweets from .txt file which contains some links. Please help me! Python code:
import tweepy
from time import sleep
from credentials3 import *
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth, wait_on_rate_limit=True,wait_on_rate_limit_notify=True)
my_file=open('post.txt','r')
file_lines=my_file.readlines()
my_file.close()
def tweet():
for line in file_lines:
try:
if line != '\n':
api.update_status(status=line)
print(line)
sleep(720)
else:
pass
except tweepy.TweepError as e:
print(e.reason)
sleep(2)
tweet()