Commit 0d91d168 by zhangqianying

Delete click.py

parent 624b41a2
#!/user/bin/python
# -*- coding: utf8 -*-
import requests
import json
import datetime
import random
import uuid
default_url = 'ec2-54-223-170-25.cn-north-1.compute.amazonaws.com.cn'
port ='8080'
path = '/receive/tkio/event'
URL = 'http://' + default_url + port + path
appid = '16dc0cb882d3dbec4f7f66251a84d6dd'
nowTime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
headers = {'Content-Type': 'application/json'}
s = json.dumps({"appid": appid,
"context": {"_deviceid": "5021FED7D1CEF374_1",
"_imei":"5021FED7D1CEF374_1",
"_idfa": "imei",
"_campaignid": "ad18fbb2efcd4905a4a487927e297842",
"_ip": "192.168.10.26",
"_androidid": "imei"
},
"when":nowTime,
"who": "zqy-test2",
"what":"event_0"
})
event=['event_0','event_1','event_2','event_3','event_4','event_5','event_6','event_7','event_8','event_9','event_10','event_11','event_12','event_13']
for index in range(len(event)):
print('当前:',event[index])
r = requests.post(url=URL, data=s, headers=headers, timeout=5)
print(r.url)
print(r.text)
print(r.status_code)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment