Simply get demo file URL of a CSGO Match (which happens to be the toughest part, for some!)
This projects uses a number of open source projects to work properly:
- Steam - ValvePython/Steam
- CSGO - ValvePython/CSGO
- Gevent - gevent is a coroutine -based Python networking library that uses greenlet to provide a high-level synchronous API on top of the libev or libuv event loop.
And of course this project itself is open source with a public repository on GitHub.
This project requires Python >3.0 to run.
git clone https://github.com/botent/CSGO-DemoURL.git
or
pip install csgo-demourl
- Initialize the
SteamWorker()
instance fromcore.py
- Get SteamAuthenticator Code from
authenticatorCode(secrets=PATH_TO_SECRETS.JSON FILE)
method - Login using
pr_login(uname=USERNAME, pword=PASSWORD, code=STEAM_AUTHENTICATOR_CODE)
method - Now it is optional but advised to define a function to return Match Demo File URL as ---
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
MIT
Free Software, Hell Yeah!