Skip to content

Instantly share code, notes, and snippets.

@NicholasShatokhin
Created June 12, 2013 08:43
Show Gist options
  • Save NicholasShatokhin/5763750 to your computer and use it in GitHub Desktop.
Save NicholasShatokhin/5763750 to your computer and use it in GitHub Desktop.
#!/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