Created
June 12, 2013 08:43
-
-
Save NicholasShatokhin/5763750 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
import urllib | |
params = { | |
'SN': 'MR', | |
'SNID': '2586199091372632788', | |
'AMOUNT': 2, | |
'PLAYDOMS': 10 | |
} | |
params_string = urllib.urlencode(params) | |
request = urllib2.Request('http://bbdev.boolat.com:1135/blackwood_and_bell/fury/callback?sn=mailru') | |
request.add_data(params_string) | |
try: | |
data = urllib2.urlopen(request).read() | |
print int(data) | |
except IOError, e: | |
print 1002; | |
print e.message | |
except ValueError, e: | |
print 1003 | |
print e.message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment