Ejemplo n.º 1
0
def putResult(userId, resultJson):
    metaAddre = "http://wx.sichuan.95504.net/d/dwr/hkezSCActivityGameService/voteSubmitSave"

    data = "ps=%5B'{0}'%2C{1}%5D&ss=%7B%7D".format(
        userId, HttpMethod.encode(json.dumps(resultJson)))
    resData = HttpMethod.post(metaAddre, data)

    res = json.loads(resData)

    if not 'status' in res.keys() or res['status'] != 1:
        raise IOError(res)
Ejemplo n.º 2
0
def getOiTicket(id):
    metaAddr = "http://wx.sichuan.95504.net/d/dwr/hkezSCActivityService/checkCouponForTen"
    data = "ps=%5B'{0}'%2C'16294977538%2C16295128571%2C17291176748'%5D&ss=%7B%7D".format(
        id)
    resData = HttpMethod.post(metaAddr, data)
    res = json.loads(resData)

    return res
Ejemplo n.º 3
0
def getResult(userId):
    metaAddre = "http://wx.sichuan.95504.net/d/dwr/scanActivetyRuleMgntService/drawCupBottle"
    data = "ps=%5B'{0}'%2C'11095158755'%2C1%5D&ss=%7B%7D".format(userId)
    resData = HttpMethod.post(metaAddre, data)
    res = json.loads(resData)

    if 'ccName' in res.keys():
        return res['ccName']

    raise IOError(res)
Ejemplo n.º 4
0
def getMatchMeta(id):
    metaAddre = "http://wx.sichuan.95504.net/d/dwr/hkezSCActivityGameService/getNowGameRule"

    data = "ps=%5B'{0}'%5D&ss=%7B%7D".format(id)

    resData = HttpMethod.post(metaAddre, data)

    res = json.loads(resData)

    if not 'status' in res.keys() or res['status'] != 1:
        raise IOError(res)

    return res['GameRules']
Ejemplo n.º 5
0
def pushOil(id):
    metaAttr = "http://wx.sichuan.95504.net/d/dwr/scanActivetyRuleMgntService/checkActiveMoreBrfore"
    data = "ps=%5B'{0}'%2C16294977538%2C1%5D&ss=%7B%7D".format(id)
    resData = HttpMethod.post(metaAttr, data)

    res = {}
    try:
        res = json.loads(resData)
        if res["status"] != 1:
            raise IOError(res)
    except JSONDecodeError as e:
        print(data)
        print(resData)
    except KeyError as err:
        print(data)
        print("KeyERROR")