You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
798 B
31 lines
798 B
1 year ago
|
import requests
|
||
|
from Util.AesUtil import *
|
||
|
from Util.CommonUtil import set_http_proxy
|
||
|
from Util.PgUtil import *
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
# 禁止代理
|
||
|
set_http_proxy("")
|
||
|
# 配置文件
|
||
|
config = ConfigUtil.getConfig()
|
||
|
# 处理机编号
|
||
|
machine_id = config['system']['machine_id']
|
||
|
# 获取签名
|
||
|
en_data = getenData(machine_id)
|
||
|
# WEB服务器地址
|
||
|
web_url = config['webServer']['web_url']
|
||
|
# 请求的地址
|
||
|
url = web_url + '/QingLong/HuiYa/addJinDou'
|
||
|
|
||
|
# 要发送的数据,可以是字典形式
|
||
|
id = 1
|
||
|
jd_count = 100
|
||
|
data = {
|
||
|
"enData": en_data,
|
||
|
"id": id,
|
||
|
"jd_count": jd_count
|
||
|
}
|
||
|
# 发送POST请求
|
||
|
response = requests.post(url, data=data)
|
||
|
print(response.text)
|