91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

使用python內(nèi)置的模塊,直接使用,已經(jīng)在python2.6,2.7版本下測試正常

資源截圖

代碼片段和文件信息

#!/usr/bin/python
#_*_coding:utf-8?_*_
import?urlliburllib2
import?json
import?sys

def?gettoken(corpidcorpsecret):
gettoken_url?=?‘https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=‘?+?corpid?+?‘&corpsecret=‘?+?corpsecret
try:
token_file?=?urllib2.urlopen(gettoken_url)
except?urllib2.HTTPError?as?e:
print?(e.code)
print?(e.read().decode(“utf8“))
sys.exit()
token_data?=?token_file.read().decode(‘utf-8‘)
token_json?=?json.loads(token_data)
token_json.keys()
token?=?token_json[‘a(chǎn)ccess_token‘]
return?token

def?senddata(access_tokenusersubjectcontent):
send_url?=?‘https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=‘?+?access_token
send_values?=?{
“touser“:user???#企業(yè)號中的用戶帳號,在zabbix用戶Media中配置,如果配置不正常,將按部門或者標簽組發(fā)送。
“toparty“:““????#企業(yè)號中的部門id
“totag“:““ ?#企業(yè)號中

評論

共有 條評論