我正在使用这个模块与steam https://github.com/ValvePython/steam交互,但是我无法使用下面的代码获得正确的steam角色状态
from steam import SteamClient
from steam.client.builtins.friends import *
client = SteamClient()
client.cli_login(username="username", password="password")
sha = SteamUser(steam_id=77777777777777777, steam=client)
print(sha)我得到- <SteamUser(77777777777777777, EPersonaState.Offline)>,因为它在网上。请帮帮我。
发布于 2017-11-02 22:20:59
您的问题是steamid 77777777777777777不存在!
Steam将它们的内部ids存储为递增的数字,第一个用户是1,第二个用户是2,并且不断重复。
不过,SteamID64是steam表示用户的最常见方式。SteamID64也是增量的,但是偏移量是76561197960265728 (内部为0),所以第一个用户应该是76561197960265728 + 1 = 76561197960265729。
正如你可能看到的,77777777777777777 - 76561197960265728 = 1216579817512049是一个巨大的数字,大约是世界人口的160532倍。
如果你在评论中链接你试图发送的蒸汽用户,我可以帮助你获得真正的SteamID64 :)
https://stackoverflow.com/questions/47076141
复制相似问题