30分钟后如何使用tweepy删除和发布推文?

时间:2020-04-03 16:44:36

标签: python tweepy

m doing a program that tweets and deletes my last tweet, but I被困了3个小时,试图想像我该怎么做,它已经发过推文,但是我不知道如何每30分钟发布一次,并在30分钟后删除我的最后一个,可以你们帮我吗? 直到现在这是我的代码

import tweepy
import time
import os

auth = tweepy.OAuthHandler('xxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxxx')
auth.set_access_token('xxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxxxxxxxxx')

api = tweepy.API(auth)

public_tweets = api.home_timeline()
media = api.media_upload("img/img.jpg")
tweet = "Using this awesome api #tweepy www.google.com"
post_result = api.update_status(status=tweet, media_ids=[media.media_id])

0 个答案:

没有答案
相关问题