Commit a6a1e5d6 by liuxiaoxing

日常迭代

parent 15ed9f4b
......@@ -23,16 +23,27 @@ def code_nums2(n=6):
# from jiami.md5 import get_str_sha1_secret_str
proiect_id = code_nums2(6)
# proiect_id = '222'
advert_id = code_nums2(6)
# advert_id = '222'
# proiect_id = '__PROJECT_ID__'
# advert_id = '__PROMOTION_ID__'
advert_name = '广告'
proiect_name = '项目'
# 向短链发送点击数据
# 广告创意ID
ry_adcreative_id = code_nums2(6)
# ry_adcreative_id = '384609'
# ry_adcreative_id = '222'
# 广告组ID
ry_adgroup_id = code_nums2(6)
# ry_adgroup_id = '019750'
# ry_adgroup_id = '222'
# 广告计划ID
ry_adplan_id = code_nums2(6)
# ry_adplan_id = '258640'
# ry_adplan_id = '222'
# 广告组名称
ry_adgroup_name = 'c测试1'
# 广告计划名称
......@@ -41,8 +52,8 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name = 'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int'
URL = 'http://uri6.com/tkio/NjeQJja?noredirect=true'
# URL = 'http://52.80.137.106:8083/tkio/aI7j6va?noredirect=true'
URL = 'http://uri6.com/tkio/EB7fIza?noredirect=true&callback_param=B.vgcH5jYqoquzezEA'
# URL = 'http://52.80.137.106:8083/tkio/RnmYB3a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
......@@ -63,7 +74,7 @@ def computeMD5upper(message):
return m.hexdigest().upper()
appkey = '5076ba423652a3254761d7493d9c80ad'
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0
......@@ -72,7 +83,7 @@ for index in range(1):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = 'A1E36666F0EB4C25'
# i = '726866819566'
o = ''.join(str(random.choice(range(10))) for _ in range(12))
m = ''.join(str(random.choice(range(10))) for _ in range(12))
se = ''.join(str(random.choice(range(10))) for _ in range(12))
......@@ -80,7 +91,7 @@ for index in range(1):
# adid = '5011813780042235'
p1 = ''.join(str(random.choice(range(10))) for _ in range(12))
accountid = ''.join(str(random.choice(range(10))) for _ in range(12))
# accountid = '383218638957'
# accountid = '222'
# p1 = '测试一下'
# "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# "idfa": '00000000-0000-0000-0000-000000000000',
......@@ -134,6 +145,10 @@ for index in range(1):
"ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id": ry_adplan_id,
"ry_adcreative_id": ry_adcreative_id,
"project_id":proiect_id,
"advert_id":advert_id,
"project_name": proiect_name,
"advert_name": advert_name,
# # # # 账户id
"accountid": accountid,
# 'imei2': 'null',
......@@ -188,7 +203,7 @@ for index in range(1):
print('success:', s)
print(p.status_code)
print(p.content)
print("计划id:"+ry_adplan_id)
print("accountid:"+accountid)
# print('androidid:',a)
# print(nowTime)
s = s + 1
......@@ -221,28 +236,28 @@ for index in range(1):
# time.sleep(5)
# try:
# allEvent().registerEvent(i, ip, appkey)
# except Exception as e:
# print('注册_wrong:', w)
# print(e)
# time.sleep(4)
# try:
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
# time.sleep(3)
# try:
# allEvent().payEvent(i, ip, appkey)
# except Exception as err:
# print(err)
# print('付费_wrong:', w)
# time.sleep(3)
# try:
# allEvent().payorder(i, ip, appkey)
# except Exception:
# print('订单_wrong:', w)
time.sleep(5)
try:
allEvent().registerEvent(i, ip, appkey)
except Exception as e:
print('注册_wrong:', w)
print(e)
time.sleep(4)
try:
allEvent().loginEvent(i, ip, appkey)
except Exception:
print('登录_wrong:', w)
time.sleep(3)
try:
allEvent().payEvent(i, ip, appkey)
except Exception as err:
print(err)
print('付费_wrong:', w)
time.sleep(3)
try:
allEvent().payorder(i, ip, appkey)
except Exception:
print('订单_wrong:', w)
# time.sleep(3)
......@@ -288,16 +303,16 @@ for index in range(1):
# print('install_wrong:', w)
# w = w + 1
#
num = index + 1
event = 'event_' + str(num)
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_28'
time.sleep(2)
try:
allEvent().ziding_event(i, ip, appkey, event)
print(event)
except Exception as err:
print(err)
print('自定义_wrong:', w)
# time.sleep(2)
# try:
# allEvent().ziding_event(i, ip, appkey, event)
# print(event)
# except Exception as err:
# print(err)
# print('自定义_wrong:', w)
# time.sleep(6)
# try:
......
......@@ -164,7 +164,7 @@ class allEvent:
'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
# 'ds': ds,
'who': 'lxx_test'
'who': '1111111'
......@@ -313,7 +313,7 @@ class allEvent:
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# 'ds': ds,
'who': 'lxx_test'
'who': '111122'
})
try:
p = requests.post(url=URL + 'loggedin', data=s, headers=headers, timeout=10)
......@@ -331,7 +331,7 @@ class allEvent:
'appid': appkey,
'context': {
# "_apptype": "quickApp",
"_account": "11111",
'_deviceid': i,
'_imei': i,
'_androidid': i,
......@@ -348,7 +348,7 @@ class allEvent:
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# 'ds': ds,
'who': 'lxx_test'
'who': '12121212'
})
p = requests.post(url=URL + 'payment', data=s, headers=headers, timeout=5)
print("付费" + p.text)
......
......@@ -10,7 +10,7 @@ import hashlib
#安卓常规渠道激活
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
appkey = 'd58151cfff3f88b7fd3372fa5f596b44'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
......@@ -30,7 +30,7 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# allEvent().payEvent(i, ip, appkey)
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
for index in range(40):
for index in range(1):
# 随机生成12为数组
s = ''.join(str(random.choice(range(10))) for _ in range(18))
p = ''.join(str(random.choice(range(10))) for _ in range(12))
......@@ -41,7 +41,7 @@ for index in range(40):
# p = '987654321234567'
# s = '2321321312h8ro321'
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '315141921832'
# i = '845743133230'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
......@@ -51,7 +51,7 @@ for index in range(40):
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
# start_time = time.time()
# allEvent().installUpload(i, ip, appkey)
allEvent().installUpload(i, ip, appkey)
# # print("time===>",(time.time()-start_time))
# # time.sleep(1)
# allEvent().startupEvent(i, ip, appkey)
......@@ -63,10 +63,10 @@ for index in range(40):
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# time.sleep(1)
num = index + 1
event = 'event_' + str(num)
# event = 'event_5'
allEvent().ziding_event(i, ip, appkey, event)
# num = index + 1
# event = 'event_' + str(num)
# # event = 'event_5'
# allEvent().ziding_event(i, ip, appkey, event)
# print(s)
# s = int(s) + 1
# time.sleep(3)
......
......@@ -8,18 +8,18 @@ import time
#向短链发送点击数据
#!!!!分包需要删掉https的s
# URL = 'http://uri6.com/tkio/3uu6rya?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/NjiYvua?noredirect=true'
URL = 'http://uri6.com/tkio/fUf6jua?noredirect=true'
# URL = 'http://52.80.137.106:8083/tkio/vEbMRba?noredirect=true'
appkey = '345b0e19ef25ab3e7cc46770c2f16a3b'
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# event = 'invoke'
cmpaignid = '112233'
cmpaignid = '8888'
# 广告创意ID
ry_adcreative_id = '9876543'
ry_adcreative_id = '111'
# 广告组ID
ry_adgroup_id = '65432'
ry_adgroup_id = '111'
# 广告计划ID
ry_adplan_id = '4321'
ry_adplan_id = '111'
# 广告组名称
ry_adgroup_name = '广告组'
# 广告计划名称
......@@ -29,7 +29,7 @@ ry_adcreative_name = '广告创意'
s = 0
w = 0
for index in range(40):
for index in range(1):
#随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12))
......@@ -56,10 +56,12 @@ for index in range(40):
# 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name,
# "ry_adgroup_id": ry_adgroup_id,
# "ry_adplan_id": ry_adplan_id,
# "ry_adcreative_id": ry_adcreative_id,
# "accountid": accountid
"ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id": ry_adplan_id,
"ry_adcreative_id": ry_adcreative_id,
"project_id": '111',
"advert_id": '111',
"accountid": '111'
}
......@@ -78,13 +80,13 @@ for index in range(40):
print('imei:', i)
print('ip', ip)
w = w+1
time.sleep(8)
try:
allEvent().installUpload(i, ip, appkey, cmpaignid)
except Exception as err:
print('install_wrong:', w)
w = w + 1
print(err)
# time.sleep(8)
# try:
# allEvent().installUpload(i, ip, appkey, cmpaignid)
# except Exception as err:
# print('install_wrong:', w)
# w = w + 1
# print(err)
# try:
# allEvent().invoke_test(i, ip, appkey, cmpaignid)
# except Exception as err:
......@@ -108,14 +110,14 @@ for index in range(40):
# allEvent().payEvent(i, ip, appkey)
# except Exception:
# print('付费_wrong:', w)
num = index + 1
event = 'event_' + str(num)
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_28'
time.sleep(2)
try:
allEvent().ziding_event(i, ip, appkey,event)
except Exception:
print('自定义_wrong:', w)
# time.sleep(2)
# try:
# allEvent().ziding_event(i, ip, appkey,event)
# except Exception:
# print('自定义_wrong:', w)
......
......@@ -10,11 +10,11 @@ appkey = '345b0e19ef25ab3e7cc46770c2f16a3b'
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid = '1122'
cmpaignid = '8888'
for index in range(1):
# 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = '189894848469'
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '189894848469'
# 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '143.205.125.236'
......
......@@ -5,14 +5,22 @@ import struct
import json
# test_url = "http://10.3.20.42:8083/tkioIdfa"
test_url = "http://idfa.trackingio.com/tkioIdfa"
# test_url = "http://idfa.trackingio.com/tkioIdfa"
#
#
# s = json.dumps({
# "idfa":"23212121",
# "token":"5v7Ao9FF78dWW9Tx",
# "appid":"1234557890"
# })
#
# p = requests.post(test_url,data=s)
# print(p)
s = json.dumps({
"idfa":"23212121",
"token":"5v7Ao9FF78dWW9Tx",
"appid":"1234557890"
})
p = requests.post(test_url,data=s)
print(p)
\ No newline at end of file
import gzip
import base64
text = "H4sIAAAAAAAAAH2UzY7TMBDHXwVV2ly8VHHiJG6lHLaFXVi2uwtdtNwqx3Fbq6kTnGSrgjgg8QiIGxcOiBscOPE+y8dbMM5Hm+WAVFX2P+OZ8c8z87qXlxFfMqVE0hv2fJe61O4d9jhbZ0wulIxBpY4g2Cac2PMBsXFk0zkJuOt7jFPGRAD2S5YfGds5S3Jx2Fuzgi+vtpmA08adzB8IkSVSrXYmcGJaRuM2dKFLEGd6O2PxQqdlNqtC24HnDvxe+yVLmGo+UDfwicm01FqoYrMUCmTHdpz7GH7+PYyHjjckJjup5P8NCrkWeQF37g2xH2DsY0wCe+CZzK9Z1k16Yq4m9ld9WQq9zQst1QLc6y1PJF/JLMR20MeU9nGfehbI9UXD398//vzw9fbL29tv740s4xBjHBBY55kWLC51Et48nj891WynKbYW4Z9P7379+Iwd18EWqKmOhQ4NNkulWsRSC17U+yqFmblTeOc2FigyDByf+j7FA8/3rX8TLVk4SV/JJGEHjucce337wBmZJZWXy1QJWLqwH40vn8N/q40upvCH3RmZYVgkcmXECePtpxfGxQAWR1mWiGsRPZFFFcC3PQiMvTbKk0dXkzOzGu/9nAi+SlsHkzSSiajOYu8hJhQ0thFrMXPsvlul+0wsZKoqk/F5HfNqCRaVEjO9Au1cFKY8K4mcgHCaT+NVtXUqJ01hVgo4AGW0LcRZylkT3bpTqmFdqFa3SsO6RmuNwzsW8kYYve4yi3GelqowhsR2KAlcmxAK5t1HME+ADnb43REC9KjeoYspqqEjgwoBcCMB7AG6A3qH2XhqEI/rMw3cAWrBNlhRFypqkQJQtMdZwUQ7lAASNRgNRLRDaACiLr7jemKMc1mIXSM1HWJqHRqpjKAhN2wLlrG4kVxUXd+tXdO2RWIalkKRu1Di4KOhbByolUo3Cqya1Xm5bqYRy7LKW+TCWLN5PPciD3wERHgxiWPiegEPItzMtSkk2RltRd6ZEYQ4QTubOi+8n6Rv/gJP+b5xYQUAAA=="
print(gzip.decompress(base64.b64decode(text)))
\ No newline at end of file
......@@ -1575,14 +1575,15 @@ def test_click():
def test_atbgoogle():
# i = code_nums(12)
i = '9C3FA051-DB2A-4F4F-9154-BC15EF565783'
i = code_nums(36)
# i = '9C3FA051-DB0A-4F4F-1004-BC15EF565787'
receiveandroid.data[0]['timestamp_info']['current_event_time'] = '1668847756000'
receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['imei1'] = ''
receiveandroid.data[0]['device_info']['gaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'gaid'
receiveandroid.data[0]['device_info']['os'] = '1'
receiveandroid.data[0]['device_info']['os_version'] = '1.0'
receiveandroid.send_requestgoogle()
print(i)
......
......@@ -46,10 +46,11 @@ global data
data = [
{
"application_info": {
"appkey": "111",
"bundleid": "3423232",
"appkey": "344234354",
"bundleid": "grere34543f4r4",
# www.jd111.com
"app_version": "1",
"channel_name": "HUAWEI"
"channel_name": "google"
},
"timestamp_info": {
"country": "MG",
......@@ -137,9 +138,9 @@ def send_request():
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
# url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
# url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data))
......
......@@ -144,9 +144,9 @@ def send_request2():
def send_request3(cs):
global parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/qIjQBja' + cs
url1 = 'http://tmtest.trackingio.com/receive/turl/myyAJza' + cs
# 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/FFNn2aa' + cs
# url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/FFNn2aa' + cs
parms['ts'] = int(round(time.time() * 1000))
# parms['ts'] = int(round(time.time()))
......
......@@ -5,18 +5,18 @@ import random
import time
import requests
appkey = '74131e54a444aa5a8597e73b646cba77'
appkey = 'adaf8e594702fa369ada109fd49f4d5e'
# cid
cid = '21075'
cid = '21029'
# surl
surl = 'J32uqia'
URL = 'http://52.80.137.106:8083/tkio/Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111'
# URL = 'http://uri6.com/tkio/Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111'
surl = 'BVjQf2a'
# URL = 'http://52.80.137.106:8083/tkio/Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111'
URL = 'http://uri6.com/tkio/Ur2MFra?noredirect=true&callback=www.baidu.com&request_id=111111&promoted_object_id=111'
impressionid = ''.join(str(random.choice(range(10))) for _ in range(12))
requestid = ''.join(str(random.choice(range(10))) for _ in range(12))
s = 0
for index in range(40):
for index in range(1):
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(28))
# i = '2539452844786738942022514936'
......@@ -36,10 +36,10 @@ for index in range(40):
# allEvent().loggedinchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().paymentchengxu(i,ip,cid,surl,appkey)
time.sleep(2)
num = index + 1
event = 'event_' + str(num)
allEvent().eventchengxu(i,ip,cid,surl,appkey,event)
# time.sleep(2)
# num = index + 1
# event = 'event_' + str(num)
# allEvent().eventchengxu(i,ip,cid,surl,appkey,event)
# for index in range(1):
......
......@@ -5,11 +5,11 @@ import random
headers = {'Content-Type': 'application/json'}
# 测试环境
URL = 'http://52.80.137.106:8080/receive/tkio/event'
# URL = 'http://52.80.137.106:8080/receive/tkio/event'
# 线上环境
# URL = 'http://tlog.trackingio.com/receive/tkio/event'
# URL = 'http://log.trackingio.com/receive/tkio/event'
URL = 'http://log.trackingio.com/receive/tkio/event'
# URL = 'http://jisulog.sortda.com/receive/tkio/event'
# 时间和日期
......@@ -48,13 +48,15 @@ class allEvent:
"_ry_adgroup_id": "111",
"_ry_adplan_id": "111",
"_ry_adcreative_id": "111",
"accountid":"123456",
"accountid": "123456",
'impression_id': impressionid,
'request_id': requestid,
# 投放广告详情-头条
"advertiser_id": "ccc",
"ad_id": "ccc",
"creative_id": "ccc",
"advertiser_id": "333",
"ad_id": "333",
"creative_id": "333",
"project_id": "333",
"advert_id": "333",
"_apptype": "wg"
},
......@@ -200,7 +202,7 @@ class allEvent:
print(p.text)
# 自定义事件
def eventchengxu(self, i, IP, cid, surl, appid,event):
def eventchengxu(self, i, IP, cid, surl, appid, event):
s = json.dumps({
"what": event,
"appid": appid,
......
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