Created
May 2, 2012 06:34
-
-
Save orlp/2574477 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib2 | |
| import json | |
| def authenticate(region, username, password): | |
| authenticate_urls = { | |
| "euw": "https://lq.eu.lol.riotgames.com/login-queue/rest/queue/authenticate", | |
| "eun": "https://lq.eun1.lol.riotgames.com/login-queue/rest/queue/authenticate", | |
| "na": "https://lq.na1.lol.riotgames.com/login-queue/rest/queue/authenticate" | |
| } | |
| request = urllib2.Request(authenticate_urls[region], "payload=user=%s,password=%s" % (username, password)) | |
| return json.loads(urllib2.urlopen(request).read()) | |
| print(authenticate("euw", "nightcracker", "***********")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment