在过去 2 周左右的时间里,我的一个 Twitter 清理脚本停止工作了。似乎不再有用于删除已发送 DM 的 destroy_message 属性。这是删除还是重命名?这是我的代码和错误。
for tweet in tweets:
print "Deleting: " + tweet["text"]
result = self._api.destroy_message(id = tweet["id"])
这里是错误:
Getting sent DMs....
Deleting: Sure no problem
Traceback (most recent call last):
File "scrub_twitter.py", line 127, in <module>
obj.delete_sent_dms()
File "scrub_twitter.py", line 102, in delete_sent_dms
result = self._api.destroy_message(id = tweet["id"])
AttributeError: 'Twython' object has no attribute 'destroy_message'
请您参考如下方法:
