I have a list of steam IDS that look like this:
STEAM_1:0:61759597
STEAM_1:1:20263946
STEAM_1:0:105065707
For all the calls to the steam API you need to give it a steamID64, those look like this:
76561198083784922
76561198000793621
76561198170397142
The steam page shows an example of how to convert from SteamID to SteamID64 https://developer.valvesoftware.com/wiki/SteamID
As a 64-bit integer
Given the components of a Steam ID, a Steam ID can be converted to it's 64-bit integer form as follows:
((Universe << 56) | (Account Type << 52) | (Instance << 32) | Account ID)
Worked Example:
Universe: Public (1)
Account Type: Clan (7)
Instance: 0
Account ID: 4
64-bit integer value: 103582791429521412
My question is how do I implement this in python. I don't understand anything that going on here.
To make my question super clear I want to start with STEAM_1:0:61759597
from that resolve the SteamID64 which is 76561198083784922
I know this is possible because there are a number of websites that do this: https://steamid.io/, http://steamidfinder.com/, https://steamid.co/
So many question is: what does this algorithm do and how do I implement it in python?
UPDATE
This is the code i have now, not working as expected:
steamID = "STEAM_1:0:61759597"
X = int(steamID[6:7])
Y = int(steamID[8:9])
Z = int(steamID[10:])
#x is 1
#y is 0
#z is 61759597
print(X,Y,Z)
print((X << 56) | (Y << 52) | (Z << 32) | 4)
#current output: 265255449329139716
#desired output: 76561198083784922