Beispiel #1
0
    print jsontext

    postbody = json.dumps(jsontext,ensure_ascii=False)

    print postbody


    url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send'

    params = {'access_token':token}

    respone = requests.post(url,params=params,data=postbody)

    print respone.content

if __name__ == '__main__':
    appid = 'wx07d1254c491a8cc6'
    secret = '1f21ad347973a669afbde3513a6864d9'
    token = setmenu.getat(appid, secret)
    print token
    # next_openid = ''
    # getuserlist(token,next_openid)

    open_id = 'oScuNjo-KiUJqAUMBRkixTgcR3L8'
    # getuserinfo(token,open_id)
    # open_id = 'oScuNjp1EUWK3uDc_UAxt3SWaE8E'

    sendinfo(token,open_id)

Beispiel #2
0
    }

    print jsontext

    postbody = json.dumps(jsontext, ensure_ascii=False)

    print postbody

    url = 'https://api.weixin.qq.com/cgi-bin/message/custom/send'

    params = {'access_token': token}

    respone = requests.post(url, params=params, data=postbody)

    print respone.content


if __name__ == '__main__':
    appid = 'wx07d1254c491a8cc6'
    secret = '1f21ad347973a669afbde3513a6864d9'
    token = setmenu.getat(appid, secret)
    print token
    # next_openid = ''
    # getuserlist(token,next_openid)

    open_id = 'oScuNjo-KiUJqAUMBRkixTgcR3L8'
    # getuserinfo(token,open_id)
    # open_id = 'oScuNjp1EUWK3uDc_UAxt3SWaE8E'

    sendinfo(token, open_id)
Beispiel #3
0
 def __init__(self):
     appid = 'wxec80b374c3ace2a4'
     secret = '0dc774afff124f656d4983a1928fa276'
     self.appid = appid
     self.sercet = secret
     self.token = setmenu.getat(appid,secret)