I’m running a simple program to go through a list of GTs and find the date the player last played a match of Halo 5, using “Halo 5 - Player Match History.”
It works for Gamertags without spaces, but not with Gamertags with spaces.
Here’s (some of) my code (Python 2.7.10):
try:
conn = httplib.HTTPSConnection(‘www.haloapi.com’)
conn.request(“GET”, “/stats/h5/players/”+cgt+"/matches?%s" % params, “{body}”, headers)
response = conn.getresponse()
cgt is the current gamertags (this is in a loop).
Here’s a link to the full code (Google Doc)
I’m not exactly sure what I’m doing wrong. If I could have some assistance, that would be great.
EDIT:
I’ve fixed it. It was just a URL encoding issue.