我的代码怎么了?粗呢

2024-05-20 14:18:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我想把我跟随的人都放开。 我的代码有什么问题?在

import tweepy
#unfollow script

consumer_key =  ""

consumer_secret = ""

access_token = ""

access_token_secret = ""


#  llölölöälöä
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth)

def unfollow():
    print("[+] Unfollowing in progress...")
    for user in api.followers():
        api.destroyfriendship(user) 

test = input("Type ENTER if you want to start.")
test = True

if test is True:
    unfollow()

else:
    print("Thanks for using my script")

AttributeError:“API”对象没有属性“destroyFriendly”


Tags: keyintesttokenauthapiforsecret