Hi guyz, after a year of inactivity I'm back in open-source business, for those who don't know me I used to make private bots using pymem, an open-source project I made to provide the needed stuff to start hacking world of warcraft.
So this time I'm here to open a discution thread about sc2profile, a new library I made for processing starcraft 2 battle profiles.
sc2profile is a small library, that makes http requests to grab informations from battle.net. It's made in python, and dump all available data of a given profile.
Code:
from sc2profile import Profile
profile = Profile('YOUR PROFILE URL')
profile.update()
And you get things like that:
Code:
name: 'nopz'
points: 1390
race: Terran
win: 15
campaign: Casual Campaign Ace
{'Co-Op vs AI': 36, 'Custom Games': 8, 'FFA': 0}
{'Cooperative': {'percentage': 7.32, 'points': 60},
'Custom Game': {'percentage': 6.82, 'points': 60},
'Exploration': {'percentage': 45.83, 'points': 220},
'Liberty Campaign': {'percentage': 57.86, 'points': 920},
'Quick Match': {'percentage': 3.45, 'points': 30}}
{'2v2': {'games': 13,
'link': 'http://eu.battle.net/sc2/en/profile/1041236/1/nopz/ladder/37402#current-rank',
'name': ' Furinax Lima',
'rank': 11,
'win': None}}
And full achievements list
Code:
{'liberty_campaign': {'Artifact Missions': {'91475035553931': {'date': '8/8/2010',
'description': u'Complete all mission objectives in the\xc2\xa0\xe2\x80\x9cSmash and Grab\xe2\x80\x9d mission.',
'earned': True,
'name': u'Smash and Grab',
'points': '15'},
'91475035553932': {'date': '8/8/2010',
'description': u'Complete the\xc2\xa0\xe2\x80\x9cSmash and Grab\xe2\x80\x9d mission on Normal difficulty without losing a unit to a Protoss Stone
Guardian.',
'earned': True,
'name': u'Rock Solid',
'points': '10'},
'91475035553933': {'date': '20/5/2011',
'description': u'Complete the\xc2\xa0\xe2\x80\x9cSmash and Grab\xe2\x80\x9d mission on Hard difficulty in less than 15 minutes.',
'earned': True,
'name': u'Hit & Run',
'points': '10'},
'91475035553934': {'date': '11/8/2010',
'description': u'Complete all mission objectives in\xc2\xa0\xe2\x80\x9cThe Dig\xe2\x80\x9d mission.',
'earned': True,
'name': u'The Dig',
'points': '15'},
....
Actually there is no tutorial and how to, I will provide more stuff later, but if you want you can have a look at the github repository. I hope that more python projects will come here, as mmowned was a reference for me when I used to make bots for world of warcraft.
Project here: https://github.com/srounet/sc2profile