Exemple #1
0
def getchgresult(method, user_id, **config):

    addconig = {'method': method, 'usernumber': user_id}

    addconig.update(config)

    userinfo = getuinfo(user_id)
    addconig.update(userinfo)

    params = getbody.getsign(**addconig)

    url = 'http://132.38.0.86:9200/openservlet'

    para = ''

    for i in params:
        para = para + i + "=" + str(params[i]) + "&"

    para = para[:-1]

    url = url + "?" + para

    print url

    respone = requests.get(url)

    context = respone.content

    result = demjson.decode(context)

    return result
Exemple #2
0
def getchgresult(method,user_id,**config):

    addconig = {'method':method,'usernumber':user_id}

    addconig.update(config)

    userinfo = getuinfo(user_id)
    addconig.update(userinfo)

    params = getbody.getsign(**addconig)

    url = 'http://132.38.0.86:9200/openservlet'

    para = ''

    for i in params:
        para =  para + i + "=" + str(params[i]) + "&"

    para = para[:-1]

    url = url + "?" + para

    print url

    respone = requests.get(url)

    context = respone.content

    result = demjson.decode(context)

    return result
Exemple #3
0
def getresult(method, user_id, **config):

    addconig = {'method': method, 'usernumber': user_id}

    addconig.update(config)

    userinfo = getuinfo(user_id)
    addconig.update(userinfo)

    params = getbody.getsign(**addconig)

    url = 'http://132.38.0.86:9200/openservlet'

    respone = requests.get(url, params=params)

    context = respone.content

    result = demjson.decode(context)

    return result
Exemple #4
0
def getuinfo(user_id):
    addconfig = {'method':'com.aop.method.realnamecheckqry','usernumber':user_id}
    params = getbody.getsign(**addconfig)

    url = 'http://132.38.0.86:9200/openservlet'


    respone = requests.get(url,params=params)

    context = respone.content


    result = demjson.decode(context)

    # for i in result:
    #     print i + result[i]

    return {'provincecode':result['provincecode'],
            'citycode':result['citycode'],
            'nettype':result['nettype'],
            'paytype':result['paytype']}
Exemple #5
0
def getuinfo(user_id):
    addconfig = {
        'method': 'com.aop.method.realnamecheckqry',
        'usernumber': user_id
    }
    params = getbody.getsign(**addconfig)

    url = 'http://132.38.0.86:9200/openservlet'

    respone = requests.get(url, params=params)

    context = respone.content

    result = demjson.decode(context)

    # for i in result:
    #     print i + result[i]

    return {
        'provincecode': result['provincecode'],
        'citycode': result['citycode'],
        'nettype': result['nettype'],
        'paytype': result['paytype']
    }
Exemple #6
0
def getresult(method,user_id,**config):

    addconig = {'method':method,'usernumber':user_id}

    addconig.update(config)

    userinfo = getuinfo(user_id)
    addconig.update(userinfo)

    params = getbody.getsign(**addconig)

    url = 'http://132.38.0.86:9200/openservlet'



    respone = requests.get(url,params=params)



    context = respone.content

    result = demjson.decode(context)

    return result