我最近制作了一个使用tweepy
模块的小脚本。问题是我无法使用api.list_direct_messages()
获取DM。
这是我的代码:
elif choose == '6':
def dmlist():
msg = api.list_direct_messages()
print (msg)
while True:
choose6 = input("\n1)Refresh\n2)Return to main menu\n\nq)Quit\n\n[Your Choice]:")
if choose6 in ['1', '2', 'q']:
break
if choose6 == '1':
dmlist()
elif choose6 == '2':
mainmenu()
elif choose6 == 'q':
print ("Goodbye!")
dmlist()
我尝试了不同的方法,例如使用游标,但是它要么显示AttributeError: 'ResultSet' object has no attribute 'something'
,要么仅显示[]
而不是终端中的文本。谁能帮我这个?预先感谢。