我正在制作一个研究应用程序,用于研究具有高权限的 twitter 用户之间的交互。其中一部分是提取有关用户的信息。我使用 Tweepy for Python 构建了一个应用程序,过去 2 天我一直在提取用户信息,没有任何问题。突然之间的请求如下:
https://api.twitter.com/1.1/users/lookup.json?user_id=14063469%2C175965206%2C116959518%2C19814396%2C59871521%2C15879224%2C53116337%2C60620244%2C22667202%2C56455965%2C40655442%2C6532392%2C24316973%2C21831390%2C19028429%2C28954030%2C31137878%2C16907284%2C16583745%2C9940452%2C19589935%2C935591%2C14602269%2C20546508%2C19773867%2C16082041%2C18320759%2C14084545%2C8731882%2C14795384%2C15664019%2C7417012%2C14634678%2C9269402%2C2348251%2C14573469%2C14441717%2C14451994%2C14412513%2C4084791%2C11922062%2C7080762%2C11916972%2C14449235%2C252192024%2C9067522%2C4084791%2C252192024%2C258597311%2C252192024%2C31920384%2C206028892%2C18495777%2C22663733%2C27221188%2C289510168%2C446444558%2C14540077%2C25195065%2C1705881%2C4084791%2C8937822%2C252192024%2C252192024%2C252192024%2C112627470%2C252192024%2C41906537%2C14822470%2C230684649%2C35758042%2C268838947%2C252192024%2C252192024%2C43303458%2C164029686%2C116950595%2C109449411%2C226911474%2C73931555%2C170619878%2C153925191%2C113826502%2C60094002%2C51161658%2C68858451%2C23453566%2C120360129%2C98659794%2C42160791%2C125832535%2C119379318%2C118153517%2C18596842%2C65443306%2C74994114%2C49875356%2C50401629%2C115960551%2C101979193
我回来了
[{u'message': u'Sorry, that page does not exist', u'code': 34}].
有谁知道可能有什么问题?
最佳答案
users_list = api.lookup_users(user_ids=id_list)
for user in users_list:
print user.screen_name
你可以试试这个,
id_list
是一个用户 ID 列表。也可以引用tweepy how to get a username from id关于Python Tweepy : Twitter Api saying that/users/lookup does not exist,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15233905/