Commit e2b61a62 by liuxiaoxing

receive 对接se

parent 39217a44
...@@ -14,20 +14,20 @@ import hashlib ...@@ -14,20 +14,20 @@ import hashlib
# from jiami.md5 import get_str_sha1_secret_str # from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据 # 向短链发送点击数据
# 广告创意ID # 广告创意ID
ry_adcreative_id = '767556' ry_adcreative_id = '222'
# 广告组ID # 广告组ID
ry_adgroup_id = '564534' ry_adgroup_id = '2222'
# 广告计划ID # 广告计划ID
ry_adplan_id = '3453534' ry_adplan_id = '22222'
# 广告组名称 # 广告组名称
ry_adgroup_name = 'snktt-cz' ry_adgroup_name = 'c测试1'
# 广告计划名称 # 广告计划名称
ry_adplan_name = 'snktt-czx-pt-s' ry_adplan_name = 'c测试1'
# 广告创意名称 # 广告创意名称
ry_adcreative_name = 'snktt-czx-p' ry_adcreative_name = 'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销 # bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int' pid = 'rryingxiao_int'
URL = 'http://uri6.com/tkio/NJVNjaa?noredirect=true' URL = 'http://52.80.137.106:8083/tkio/ZNZv6za?noredirect=true'
# 测试头条衍生事件回调时加上 # 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D # callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3' # URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
...@@ -45,7 +45,7 @@ def computeMD5upper(message): ...@@ -45,7 +45,7 @@ def computeMD5upper(message):
m = hashlib.md5() m = hashlib.md5()
m.update(message.encode(encoding='utf-8')) m.update(message.encode(encoding='utf-8'))
return m.hexdigest().upper() return m.hexdigest().upper()
appkey = '8a390227254c03dbcaddbca009cd6e8b' appkey = '1be524b1a26b2f3e0ec8708e12369336'
lst = [] lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0 s = 0
...@@ -54,7 +54,7 @@ for index in range(1): ...@@ -54,7 +54,7 @@ for index in range(1):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) # print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组 # 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '65453434546345' # i = '822976099354'
o = ''.join(str(random.choice(range(10))) for _ in range(12)) o = ''.join(str(random.choice(range(10))) for _ in range(12))
m = ''.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)) se = ''.join(str(random.choice(range(10))) for _ in range(12))
...@@ -89,7 +89,7 @@ for index in range(1): ...@@ -89,7 +89,7 @@ for index in range(1):
'click_time':str(round(time.time() * 1000)), 'click_time':str(round(time.time() * 1000)),
# 'androidid': '86ab7f6642bdde717709216e68d0b', # 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei': i, 'imei': i,
'imei_MD5': computeMD5upper(i), # 'imei_MD5': computeMD5upper(i),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****', # 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试', # 'clickid': '测试测试',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30', # "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
...@@ -146,7 +146,7 @@ for index in range(1): ...@@ -146,7 +146,7 @@ for index in range(1):
# '_carrier': '1', # '_carrier': '1',
# 'syscountryc': '1', # 'syscountryc': '1',
# 'sysrtime': '1', # 'sysrtime': '1',
# "accountid": accountid "accountid": accountid
} }
# timeout可以超时四秒 # timeout可以超时四秒
# verify = False # verify = False
...@@ -155,7 +155,7 @@ for index in range(1): ...@@ -155,7 +155,7 @@ for index in range(1):
print('imeimd5:', computeMD5upper(i)) print('imeimd5:', computeMD5upper(i))
print("ip:", ip) print("ip:", ip)
# print("accountid:", accountid) print("accountid:", accountid)
print(p.text) print(p.text)
print(p.url) print(p.url)
# print("oaid:",o) # print("oaid:",o)
...@@ -174,13 +174,13 @@ for index in range(1): ...@@ -174,13 +174,13 @@ for index in range(1):
# print('androidid', a) # print('androidid', a)
w = w + 1 w = w + 1
# time.sleep(10) time.sleep(10)
# try: try:
# allEvent().installUpload(i, ip, appkey) allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey) # allEvent().formevent(i, ip, appkey)
#
# except Exception: except Exception:
# print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 # w = w + 1
# #
# #
...@@ -258,7 +258,7 @@ for index in range(1): ...@@ -258,7 +258,7 @@ for index in range(1):
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# event = 'event_17' # event = 'event_1'
# time.sleep(3) # time.sleep(3)
# try: # try:
# allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
......
...@@ -7,7 +7,9 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access ...@@ -7,7 +7,9 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境 # 测试环境
URL_batch = 'http://10.3.20.42:8080/receive/batch' URL_batch = 'http://10.3.20.42:8080/receive/batch'
URL = 'http://10.2.20.42:8080/receive/tkio/' # URL = 'http://10.2.20.42:8080/receive/tkio/'
URL = 'http://52.81.116.128:18081/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/' # URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/' # URL = 'http://jisulog.sortda.com/receive/tkio/'
# URL = 'http://172.31.21.207:8080/receive/tkio/' # URL = 'http://172.31.21.207:8080/receive/tkio/'
...@@ -76,7 +78,7 @@ class allEvent: ...@@ -76,7 +78,7 @@ class allEvent:
"_pkgname": "com.yanjing.yami", "_pkgname": "com.yanjing.yami",
# "_campaignid": 'default', # "_campaignid": 'default',
"_deviceid": i, "_deviceid": i,
"_imei": 'E83DC0B76BC1691CB9C45E5A63468660', "_imei": i,
# '_oaid': '697134960e9ff8df46f21b4f97db595a1', # '_oaid': '697134960e9ff8df46f21b4f97db595a1',
# "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07', # "_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
# 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36', # 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36',
...@@ -397,9 +399,8 @@ class allEvent: ...@@ -397,9 +399,8 @@ class allEvent:
# 识别是否为自定义事件,默认传1 # 识别是否为自定义事件,默认传1
'_isreyundefaultevent': '1', '_isreyundefaultevent': '1',
# 'who': 'lxxtest', # 'who': 'lxxtest',
's': '0', 'param1': '1',
'e': '1',
'm': '2',
}, },
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())), # 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = 'ae6f9fb7e7bc336bffb63de711c7bec0' appkey = '1be524b1a26b2f3e0ec8708e12369336'
# 线上预约app # 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953 # 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd # 16dc0cb882d3dbec4f7f66251a84d6dd
...@@ -38,21 +38,21 @@ for index in range(1): ...@@ -38,21 +38,21 @@ for index in range(1):
# p = '987654321234567' # p = '987654321234567'
# s = '2321321312h8ro321' # s = '2321321312h8ro321'
i = ''.join(str(random.choice(range(10))) for _ in range(12)) # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '885709229829' i = '990993451126'
# i = '00000000-0000-0000-0000-000000000000' # i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623 # 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '110.186.108.28' # ip = '124.158.98.207'
# 地域测试ip # 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市 # 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市 # 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市 # 119.60.0.0 宁夏回族自治区银川市
allEvent().installUpload(i, ip, appkey) # allEvent().installUpload(i, ip, appkey)
time.sleep(1) # time.sleep(1)
allEvent().startupEvent(i, ip, appkey) # allEvent().startupEvent(i, ip, appkey)
# # time.sleep(1) # # time.sleep(1)
# allEvent().loginEvent(i, ip, appkey) allEvent().loginEvent(i, ip, appkey)
# time.sleep(1) # time.sleep(1)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
...@@ -61,7 +61,7 @@ for index in range(1): ...@@ -61,7 +61,7 @@ for index in range(1):
# time.sleep(1) # time.sleep(1)
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# # event = 'event_10' # event = 'event_6'
# allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
# print(s) # print(s)
# s = int(s) + 1 # s = int(s) + 1
......
import random
what = ['install','event_1']
i = random.choice(range(2))
print(what[i])
\ No newline at end of file
...@@ -8,11 +8,11 @@ import time ...@@ -8,11 +8,11 @@ import time
#向短链发送点击数据 #向短链发送点击数据
#!!!!分包需要删掉https的s #!!!!分包需要删掉https的s
URL = 'http://uri6.com/tkio/RZFFFba?noredirect=true&callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D' URL = 'http://uri6.com/tkio/eeQfQza?noredirect=true&callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D'
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' appkey = '8a390227254c03dbcaddbca009cd6e8b'
# event = 'invoke' # event = 'invoke'
cmpaignid = '233445' cmpaignid = '1122'
# 广告创意ID # 广告创意ID
ry_adcreative_id = '9876543' ry_adcreative_id = '9876543'
# 广告组ID # 广告组ID
...@@ -28,7 +28,7 @@ ry_adcreative_name = '广告创意' ...@@ -28,7 +28,7 @@ ry_adcreative_name = '广告创意'
s = 0 s = 0
w = 0 w = 0
for index in range(30): for index in range(1):
#随机生成12为数组 #随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
...@@ -41,7 +41,8 @@ for index in range(30): ...@@ -41,7 +41,8 @@ for index in range(30):
# accountid = '014067084301' # accountid = '014067084301'
try: try:
parms = { parms = {
# 'androidid': "43214532142142", 'click_time': str(round(time.time() * 1000)),
# 'androidid': "43214532142142",
'imei': i, 'imei': i,
# "idfa": 'DBC13622-E34B-440C-B7A7-FB6641D0D9AB', # "idfa": 'DBC13622-E34B-440C-B7A7-FB6641D0D9AB',
'ip': ip, 'ip': ip,
...@@ -76,13 +77,13 @@ for index in range(30): ...@@ -76,13 +77,13 @@ for index in range(30):
print('imei:', i) print('imei:', i)
print('ip', ip) print('ip', ip)
w = w+1 w = w+1
# time.sleep(8) time.sleep(8)
# try: try:
# allEvent().installUpload(i, ip, appkey, cmpaignid) allEvent().installUpload(i, ip, appkey, cmpaignid)
# except Exception as err: except Exception as err:
# print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 w = w + 1
# print(err) print(err)
# try: # try:
# allEvent().invoke_test(i, ip, appkey, cmpaignid) # allEvent().invoke_test(i, ip, appkey, cmpaignid)
# except Exception as err: # except Exception as err:
......
...@@ -5,12 +5,12 @@ import random ...@@ -5,12 +5,12 @@ import random
import time import time
import time import time
#安卓分包激活 #安卓分包激活
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' appkey = '6012db28b7fbdfcb1e3a847756137f9b'
#57ed2dd31596bb4682471e82c0c73c1a #57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f # 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10' # event = 'event_10'
cmpaignid = '112233' cmpaignid = '112222'
for index in range(1): for index in range(1):
# 随机生成12为数组 # 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12)) i = ''.join(str(random.choice(range(10))) for _ in range(12))
......
...@@ -8,8 +8,9 @@ import string ...@@ -8,8 +8,9 @@ import string
#向短链发送点击数据 #向短链发送点击数据
#渠道短链 #渠道短链
URL = 'http://uri6.com/tkio/vMn2eea?callback_param=CL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEAcallback=http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEA%26os%3D1%26muid%3DA76A313F-A1D6-4BED-8C21-C16B2EEFC618&noredirect=true&ry_dp=true&rydp_path=null&rydp_url=https%3A%2F%2F123&noredirect=true' # URL = 'http://52.80.137.106:8083/tkio/JF7JFja?noredirect=true'
appkey = '3f2706b7afdf89d95ffa7d2e9cc13e2e' URL = 'http://uri6.com/tkio/NJVNjaa?noredirect=true'
appkey = '017bf97c10d7bc79df1b4ed37e77b283'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra' # URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event = 'invoke' event = 'invoke'
# 广告创意ID # 广告创意ID
...@@ -59,7 +60,7 @@ for _ in range(1): ...@@ -59,7 +60,7 @@ for _ in range(1):
'click_time': str(round(time.time() * 1000)), 'click_time': str(round(time.time() * 1000)),
'idfa': i, 'idfa': i,
# 'idfa_MD5': '4f17acf12727bfb060422996db969365', # 'idfa_MD5': '4f17acf12727bfb060422996db969365',
# 'idfv': 'IFV_05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew', # 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287',
# 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607', # 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607',
# 'muid':i, # 'muid':i,
# 'oaid':'654324352124312232', # 'oaid':'654324352124312232',
...@@ -91,14 +92,14 @@ for _ in range(1): ...@@ -91,14 +92,14 @@ for _ in range(1):
print('idfa:', i) print('idfa:', i)
print('ip', ip) print('ip', ip)
w=w+1 w=w+1
# time.sleep(10) time.sleep(10)
# try: try:
# allEvent().installUpload(i, ip, appkey) allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey) # allEvent().formevent(i, ip, appkey)
#
# except Exception: except Exception:
# print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 w = w + 1
# time.sleep(3) # time.sleep(3)
# try: # try:
# allEvent().adshow(i, ip, appkey,adid) # allEvent().adshow(i, ip, appkey,adid)
...@@ -146,12 +147,12 @@ for _ in range(1): ...@@ -146,12 +147,12 @@ for _ in range(1):
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
# except Exception: # except Exception:
# print('登录_wrong:', w) # print('登录_wrong:', w)
time.sleep(10) # time.sleep(10)
try: # try:
allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
except Exception as err: # except Exception as err:
print(err) # print(err)
print('自定义_wrong:', w) # print('自定义_wrong:', w)
# #
# time.sleep(10) # time.sleep(10)
# try: # try:
......
...@@ -8,6 +8,7 @@ import random ...@@ -8,6 +8,7 @@ import random
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
# URL = 'http://10.2.20.42:8080/receive/tkio/' # URL = 'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://52.81.116.128:18081/receive/tkio/'
URL = 'http://log.trackingio.com/receive/tkio/' URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/' # URL = 'http://jisulog.sortda.com/receive/tkio/'
...@@ -71,7 +72,7 @@ class allEvent: ...@@ -71,7 +72,7 @@ class allEvent:
# 45F38BD4-64DA-485E-BAFD-D1ECEBBCAF18 # 45F38BD4-64DA-485E-BAFD-D1ECEBBCAF18
"_idfa": i, "_idfa": i,
# "_oaid":'45F568D4-68DA-875E-BAFD-D3ECEBBCAU56', # "_oaid":'45F568D4-68DA-875E-BAFD-D3ECEBBCAU56',
# "_idfv": i, "_idfv": '64F5A794-A942-4209-81B0-D28FD01E9287',
"_ip": IP, "_ip": IP,
# 'ua': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)', # 'ua': 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 SP-engine/2.30.0 baiduboxapp/12.13.0.10 (Baidu; P2 13.6.1)',
'_manufacturer': manufacturer, '_manufacturer': manufacturer,
...@@ -91,50 +92,50 @@ class allEvent: ...@@ -91,50 +92,50 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1 # 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2 # 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload # # 转化类型,新增或重装,Download 或 Redownload
"iad-conversion-type": "Download", # "iad-conversion-type": "Download",
#
# 广告活动组ID(campaign group id) # # 广告活动组ID(campaign group id)
"iad-org-id": "123456789", # "iad-org-id": "123456789",
# 广告活动组名称(campaign group name) # # 广告活动组名称(campaign group name)
"iad-org-name": "name", # "iad-org-name": "name",
#
# 广告活动ID # # 广告活动ID
"iad-campaign-id": "111", # "iad-campaign-id": "111",
# 广告活动名称 # # 广告活动名称
"iad-campaign-name": "CampaignName", # "iad-campaign-name": "CampaignName",
#
#
# 广告组ID # # 广告组ID
"iad-adgroup-id": "111111", # "iad-adgroup-id": "111111",
# 广告组名称 # # 广告组名称
"iad-adgroup-name": "AdGroupName", # "iad-adgroup-name": "AdGroupName",
#
#
# 关键词 id # # 关键词 id
"iad-keyword-id": "111", # "iad-keyword-id": "111",
# 关键词 # # 关键词
"iad-keyword": "Keyword", # "iad-keyword": "Keyword",
#
#
# 素材ID # # 素材ID
"iad-creativeset-id": "111", # "iad-creativeset-id": "111",
# 素材名称 # # 素材名称
"iad-creativeset-name": "CreativeSetName", # "iad-creativeset-name": "CreativeSetName",
#
# 点击ASA广告时间 # # 点击ASA广告时间
"iad-click-date": '2021-06-24T11:32:33Z', # "iad-click-date": '2021-06-24T11:32:33Z',
# 本次下载完成的时间(仅ASA转化时,该值传且必传) # # 本次下载完成的时间(仅ASA转化时,该值传且必传)
"iad-conversion-date": when, # "iad-conversion-date": when,
#
# Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配 # # Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# 关键词匹配类型 # # 关键词匹配类型
"iad-keyword-matchtype": "SearchMatch", # "iad-keyword-matchtype": "SearchMatch",
#首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间) # #首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
"iad-purchase-date": '2021-06-24T11:32:33Z', # "iad-purchase-date": '2021-06-24T11:32:33Z',
# 归因结果 # # 归因结果
"iad-attribution": "true", # "iad-attribution": "true",
# 国家 # # 国家
"iad-country-or-region": "US", # "iad-country-or-region": "US",
# 'asa_install_time':'2021-06-24T11:32:33Z', # 'asa_install_time':'2021-06-24T11:32:33Z',
......
...@@ -6,10 +6,10 @@ import string ...@@ -6,10 +6,10 @@ import string
import time import time
#iOS常规渠道激活 #iOS常规渠道激活
appkey = '6012db28b7fbdfcb1e3a847756137f9b' appkey = 'd7fbbb5410a9b70754c9d1e8f16741b3'
event = 'event_1' event = 'event_1'
for index in range(30): for index in range(1):
# 随机生成12为数组 # 随机生成12为数组
a = "".join(random.sample(string.ascii_letters + string.digits, 8)) a = "".join(random.sample(string.ascii_letters + string.digits, 8))
b = "".join(random.sample(string.ascii_letters + string.digits, 4)) b = "".join(random.sample(string.ascii_letters + string.digits, 4))
...@@ -24,8 +24,8 @@ for index in range(30): ...@@ -24,8 +24,8 @@ for index in range(30):
# 随机生成ip # 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff))) ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '61.192.125.69' # ip = '61.192.125.69'
# allEvent().installUpload(i,ip,appkey) allEvent().installUpload(i,ip,appkey)
# allEvent().startupEvent(i, ip, appkey) allEvent().startupEvent(i, ip, appkey)
# time.sleep(10) # time.sleep(10)
# allEvent().loginEvent(i, ip, appkey) # allEvent().loginEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
...@@ -33,9 +33,9 @@ for index in range(30): ...@@ -33,9 +33,9 @@ for index in range(30):
# time.sleep(1) # time.sleep(1)
# allEvent().payorder(i, ip, appkey) # allEvent().payorder(i, ip, appkey)
# time.sleep(3) # time.sleep(3)
num = index + 1 # num = index + 1
event = 'event_' + str(num) # event = 'event_' + str(num)
allEvent().ziding_event(i, ip, appkey, event) # allEvent().ziding_event(i, ip, appkey, event)
# print(event) # print(event)
# allEvent().adshow(i,ip,appkey,adid) # allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid) # allEvent().adclick(i,ip,appkey,adid)
......
...@@ -1026,37 +1026,49 @@ def test_atb45(): ...@@ -1026,37 +1026,49 @@ def test_atb45():
i = code_nums(12) i = code_nums(12)
redirectandroid.parms['callback_url'] = 'https://www.baidu.com/?tn=98010089_dg&ch=16/' redirectandroid.parms['callback_url'] = 'https://www.baidu.com/?tn=98010089_dg&ch=16/'
redirectandroid.parms['oaid'] = i redirectandroid.parms['oaid'] = i
redirectandroid.send_request3("FV73Yra", '') redirectandroid.send_request3('')
time.sleep(5) time.sleep(5)
receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d' # receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
receiveandroid.send_request()
time.sleep(3)
receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid' receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
receiveandroid.data[0]["event_info"]['event_name'] = 'startup'
receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
receiveandroid.send_request() receiveandroid.send_request()
# time.sleep(3) # time.sleep(3)
# receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d' # receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
# receiveandroid.data[0]['device_info']['device_id'] = i # receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i # receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid' # receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = 'register' # receiveandroid.data[0]["event_info"]['event_name'] = 'startup'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset' # receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request() # receiveandroid.send_request()
time.sleep(3) time.sleep(3)
receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
receiveandroid.data[0]['device_info']['device_id'] = i receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid' receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
receiveandroid.data[0]["event_info"]['event_name'] = 'purchase' receiveandroid.data[0]["event_info"]['event_name'] = 'register'
receiveandroid.data[0]["event_info"]['event_type'] = 'preset' receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
receiveandroid.send_request() receiveandroid.send_request()
time.sleep(3)
receiveandroid.data[0]['device_info']['device_id'] = i
receiveandroid.data[0]['device_info']['oaid'] = i
receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
receiveandroid.data[0]["event_info"]['event_name'] = 'login'
receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
receiveandroid.send_request()
# time.sleep(3)
# receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = 'purchase'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request()
# time.sleep(3)
# receiveandroid.data[0]['device_info']['device_id'] = i
# receiveandroid.data[0]['device_info']['oaid'] = i
# receiveandroid.data[0]['device_info']['device_id_type'] = 'oaid'
# receiveandroid.data[0]["event_info"]['event_name'] = 'order'
# receiveandroid.data[0]["event_info"]['event_type'] = 'preset'
# receiveandroid.send_request()
# time.sleep(3) # time.sleep(3)
# receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d' # receiveandroid.data[0]['application_info']['appkey'] = 'b8e5e389e1223ffa16a5a9420258383d'
# receiveandroid.data[0]['device_info']['device_id'] = i # receiveandroid.data[0]['device_info']['device_id'] = i
......
...@@ -1207,7 +1207,7 @@ def test_atb44(): ...@@ -1207,7 +1207,7 @@ def test_atb44():
redirectios.parms['idfa'] = i redirectios.parms['idfa'] = i
redirectios.parms['idfa_md5'] = computeMD5(i) redirectios.parms['idfa_md5'] = computeMD5(i)
redirectios.send_request3('') redirectios.send_request3('')
time.sleep(3) time.sleep(5)
receiveios.data[0]['device_info']['idfa'] = i receiveios.data[0]['device_info']['idfa'] = i
receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i) receiveios.data[0]['device_info']['idfa_md5'] = computeMD5(i)
receiveios.data[0]['device_info']['idfv'] = v receiveios.data[0]['device_info']['idfv'] = v
......
import json
import pytest
import requests
url = "http://10.2.20.41:8099/tkio2/openapi/v1/channel_callback/"
cookie = 'ry-token=InTqr6Hwz1u6MGZl1WpdL6cR8KgL3sfj'
headers = {
'Content-Type': 'application/json',
'Cookie': cookie
}
def test_add():
data = {
"appkey": "678ca51be65b91dfdd86293af9cfbe31",
"cid": 17797,
"callback_name": "腾讯广告-install",
"callback_template": "install",
"event_name": "install",
"attribution_type": "ua",
"touchpoint_type": "click"
}
send_request('add', data)
def send_request(sub_url, data):
response = requests.request("POST", url + sub_url, headers=headers, data=json.dumps(data))
print(response.text)
if __name__ == '__main__':
pytest.main()
...@@ -16,7 +16,7 @@ data = [ ...@@ -16,7 +16,7 @@ data = [
{ {
"application_info": { "application_info": {
# 线上-55705dbd45dd246751b87bba94b8c73c # 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-678ca51be65b91dfdd86293af9cfbe31 # 测试-55705dbd45dd246751b87bba94b8c73c
"appkey": "55705dbd45dd246751b87bba94b8c73c", "appkey": "55705dbd45dd246751b87bba94b8c73c",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
......
...@@ -127,7 +127,10 @@ def send_request2(): ...@@ -127,7 +127,10 @@ def send_request2():
# 测试归因用的方法,与其他方法区别在于ts为当前时间 # 测试归因用的方法,与其他方法区别在于ts为当前时间
def send_request3(cs): def send_request3(cs):
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/fQvuUba' + cs # 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/B73uQja' + cs
# 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a' + cs
parms['ts'] = int(round(time.time() * 1000)) parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
...@@ -143,6 +146,8 @@ def send_request3(cs): ...@@ -143,6 +146,8 @@ def send_request3(cs):
def send_request4(): def send_request4():
global parms global parms
url1 = 'http://tmtest.trackingio.com/receive/turl/zMFjQva' url1 = 'http://tmtest.trackingio.com/receive/turl/zMFjQva'
# url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a'
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.url) print(response.url)
print(response.text) print(response.text)
......
...@@ -86,7 +86,9 @@ data_temp = json.dumps(parms) ...@@ -86,7 +86,9 @@ data_temp = json.dumps(parms)
# print(p.content) # print(p.content)
def send_request(cs): def send_request(cs):
global parms global parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/aimmeya' + cs # url1 = 'http://tmtest.trackingio.com/receive/turl/aimmeya' + cs
# 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
...@@ -99,7 +101,9 @@ def send_request(cs): ...@@ -99,7 +101,9 @@ def send_request(cs):
def send_request3(cs): def send_request3(cs):
global parms global parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2a' + cs # url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2a' + cs
# 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia' + cs
parms['ts'] = int(round(time.time() * 1000)) parms['ts'] = int(round(time.time() * 1000))
response = requests.get(url=url1, params=parms, timeout=10, verify=False) response = requests.get(url=url1, params=parms, timeout=10, verify=False)
......
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