Steam is a bit tough when it comes to fetching info. However, they are cool with community projects and this aims to enable other developers save time and efforts (and preferably spend more time parsing demo file data than getting the file itself ;-))
This project requires Python >3.0 to run.
git clone https://github.com/botent/CSGO-DemoURL.git
or
pip install csgo-demourl
SteamWorker()
instance from core.py
authenticatorCode(secrets=PATH_TO_SECRETS.JSON FILE)
methodpr_login(uname=USERNAME, pword=PASSWORD, code=STEAM_AUTHENTICATOR_CODE)
method
def matchInfo():
matchinfo = worker.getSharecodeInfo(matchcode=MATCH_SHARE_CODE)
matchid = matchinfo['matchid']
outcomeid = matchinfo['outcomeid']
token = matchinfo['token']
info = worker.getMatchInfo(matchid=matchid, outcomeid=outcomeid, token=token)
result = json.loads(MessageToJson(info))['matches'][0]['roundstatsall'][23]['map']
worker.close() # Optional (to logout and disconnect from Steam Account)
return result
resp = matchInfo() # This gives you the demo URL
I am more than happy to help in any way I can. Feel free to reach out to me via Twitter (@KumarPeri)
This projects uses a number of open source projects to work properly:
And of course this project itself is open source with a public repository on GitHub.
MIT
Free Software, Hell Yeah!