def event(message): weixinapi = Weixinapi(fromUser=fromUser, msgType=type) str = weixinapi.createEvent(type=message) str = str.decode('utf8') str = html.escape(str) return str
def text(message): weixinapi = Weixinapi(fromUser=fromUser, msgType=type) url = weixinapi.createUrl(url='http:act.qydw.net/message/response',token='passiontokenquyundong20150401') str = weixinapi.createText(message) return str