https://github.com/caneroj1/dota2py
This is a script I wrote in Python/Ruby that processes match information from the game Dota 2. The branch v2 has the new Ruby code that get matches and the Python code that processes a match.
https://github.com/caneroj1/dota2py
Last synced: about 2 months ago
JSON representation
This is a script I wrote in Python/Ruby that processes match information from the game Dota 2. The branch v2 has the new Ruby code that get matches and the Python code that processes a match.
- Host: GitHub
- URL: https://github.com/caneroj1/dota2py
- Owner: caneroj1
- Created: 2014-02-28T18:44:58.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-12T22:20:13.000Z (about 11 years ago)
- Last Synced: 2025-02-03T11:47:58.457Z (4 months ago)
- Language: Python
- Homepage:
- Size: 402 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dota2Py
=======
This is a script I wrote in Python that processes match information from the game Dota 2.The filename specified on line 7 is the name of a file that I retrieved previously that contains a list of my most recent 100 matches. This script opens that file, and three other files that are all necessary before the processing actually begins.
apikey.txt -- This file contains the api key given to me by Valve that allows me to retrieve data from their servers.
steamid.txt -- This file contains my Steam account number and my Dota2 player account number. My Steam account number is needed to limit the search of matches to those that I participated in. My Dota2 player account number is needed to find myself in a specific match.
The file is of this form
steam account id
XXXXXXXX
dota2 player account id
XXXXXXXXheroesList.txt -- This file contains a list of heroes in the game. This file is used to create a python dictionary of heroes of the form
heroId -> heroNameThe first two files are included in this directory but the actual values of the IDs have been replaced with placeholder text that you can replace with your information.
Finally, the actual processing of match details extracts the hero I played, the date of the match, my K-D-A with that hero, and the level I was at the end of the match and writes it to a file.