-2
我想取消关注所有的人,我跟随。 我的代码有什么问题?什么是错在我的代码? Tweepy
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”对象有没有属性“destroyfriendship”
尝试'destroy_friendship'代替。参见[这里](http://docs.tweepy.org/en/v3.5.0/api.html#API.destroy_friendship) – 2017-01-02 14:19:05
比我得到错误414 – leisureTheo
该方法被调用适当所以你的问题就解决了。如果你正面临另一个问题,打开一个新的问题。 – 2017-01-02 14:27:22