CSGO-DemoURL

View the Project on GitHub botent/CSGO-DemoURL

CSGO-DemoURL

The easy way to develop your next CSGO Project

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 ;-))

Installation

This project requires Python >3.0 to run.

git clone https://github.com/botent/CSGO-DemoURL.git

or

pip install csgo-demourl

Usage

  1. Initialize the SteamWorker() instance from core.py
  2. Get SteamAuthenticator Code from authenticatorCode(secrets=PATH_TO_SECRETS.JSON FILE) method
  3. Login using pr_login(uname=USERNAME, pword=PASSWORD, code=STEAM_AUTHENTICATOR_CODE) method
  4. 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

Help

I am more than happy to help in any way I can. Feel free to reach out to me via Twitter (@KumarPeri)

Twitter Follow

Tech

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.

License

MIT

Free Software, Hell Yeah!