import tweepy
auth = tweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret'])
auth.set_access_token(keys['access_token'], keys['access_token_secret'])
api = tweepy.API(auth)
def tweet():
ftweet = open("tweet.txt", "r", encoding="utf8")
fftweet = ftweet.read()
#message=input("tweet: ")
#imagepath=input("image: ")
# api.update_status(message)
# api.update_with_media(filename=imagepath,status=message,place_id='ce7988d3a8b6f49f') #indonesia
#api.update_with_media(filename=imagepath,status=fftweet,place_id='06ef846bfc783874',file=imagepath) #japan
#With Video
upload_result = api.media_upload('C:/Users/Immobi-PC/Downloads/Ai3Ren8ARXQKgPjW.mp4')
api.update_status(status=fftweet, place_id='06ef846bfc783874', media_ids=[upload_result.media_id_string])
time.sleep(1000)
if __name__ == "__main__":
while 1:
tweet()
Это код, который я использовал, чтобы чирикать изображения с подписями.
Как вы чирикаете видео с помощью Tweepy? Пожалуйста, помогите мне.