Commit 4c6eb513 by liuxiaoxing

asa归因逻辑

parent 3ce488da
...@@ -27,7 +27,9 @@ ry_adplan_name = 'c测试1' ...@@ -27,7 +27,9 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name = 'c测试1' 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://52.80.137.106:8083/tkio/Nfuuiea?noredirect=true' URL = 'http://52.80.137.106:8083/tkio/j2i6rea?noredirect=true'
# URL = 'http://uri6.com/tkio/VF7bqma?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 +47,8 @@ def computeMD5upper(message): ...@@ -45,7 +47,8 @@ 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 = '1be524b1a26b2f3e0ec8708e12369336'
appkey = '6012db28b7fbdfcb1e3a847756137f9b'
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
...@@ -95,8 +98,8 @@ for index in range(1): ...@@ -95,8 +98,8 @@ for index in range(1):
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30', # "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
# 'gxid': '78B5382F687FAD16E75F5DDDC7745013', # 'gxid': '78B5382F687FAD16E75F5DDDC7745013',
# 'caid': '00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C', # 'caid': '00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C',
# 'oaid': '697134960e9ff8df46f21b4f97db595a1', # 'oaid': i,
# 'oaid_MD5': '9f89c84a559f573636a47ff8daed0d33', # 'oaid_MD5': computeMD5upper(i),
'ip': ip, 'ip': ip,
# 'pid': pid, # 'pid': pid,
# 'vid': '7653236654354534rffdvdv!@#¥%@测试测试' # 'vid': '7653236654354534rffdvdv!@#¥%@测试测试'
...@@ -154,8 +157,8 @@ for index in range(1): ...@@ -154,8 +157,8 @@ for index in range(1):
print('imei:', i) print('imei:', i)
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)
...@@ -181,7 +184,7 @@ for index in range(1): ...@@ -181,7 +184,7 @@ for index in range(1):
except Exception: except Exception:
print('install_wrong:', w) print('install_wrong:', w)
# w = w + 1 w = w + 1
# #
# #
# time.sleep(5) # time.sleep(5)
......
...@@ -8,7 +8,7 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access ...@@ -8,7 +8,7 @@ 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://52.80.137.106:8080/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/'
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = '1be524b1a26b2f3e0ec8708e12369336' appkey = 'ce4d9e34a23b8b63e2ddcf4042a38353'
# 线上预约app # 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953 # 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd # 16dc0cb882d3dbec4f7f66251a84d6dd
...@@ -38,8 +38,8 @@ for index in range(1): ...@@ -38,8 +38,8 @@ 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 = '990993451126' # 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)))
...@@ -48,9 +48,9 @@ for index in range(1): ...@@ -48,9 +48,9 @@ for index in range(1):
# 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)
......
...@@ -5,11 +5,12 @@ import socket ...@@ -5,11 +5,12 @@ import socket
import struct import struct
import time import time
import string import string
import hashlib
#向短链发送点击数据 # 向短链发送点击数据
#渠道短链 # 渠道短链
# URL = 'http://52.80.137.106:8083/tkio/JF7JFja?noredirect=true' # URL = 'http://52.80.137.106:8083/tkio/JF7JFja?noredirect=true'
URL = 'http://uri6.com/tkio/NJVNjaa?noredirect=true' URL = 'http://uri6.com/tkio/FFvqUja?noredirect=true&impression=true'
appkey = '017bf97c10d7bc79df1b4ed37e77b283' appkey = '017bf97c10d7bc79df1b4ed37e77b283'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra' # URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event = 'invoke' event = 'invoke'
...@@ -27,19 +28,26 @@ ry_adplan_name = 'ry_adplan_name' ...@@ -27,19 +28,26 @@ ry_adplan_name = 'ry_adplan_name'
ry_adcreative_name = 'ry_adcreative_name' ry_adcreative_name = 'ry_adcreative_name'
s=0 # md5加密
w=0 def computeMD5upper(message):
m = hashlib.md5()
m.update(message.encode(encoding='utf-8'))
return m.hexdigest().upper()
s = 0
w = 0
for _ in range(1): for _ 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))
c = "".join(random.sample(string.ascii_letters+string.digits, 4)) c = "".join(random.sample(string.ascii_letters + string.digits, 4))
d = "".join(random.sample(string.ascii_letters+string.digits, 4)) d = "".join(random.sample(string.ascii_letters + string.digits, 4))
e = "".join(random.sample(string.ascii_letters+string.digits, 12)) e = "".join(random.sample(string.ascii_letters + string.digits, 12))
i = (a+"-"+b+"-"+c+"-"+d+"-"+e).upper() i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper()
# i = '00000000-0000-0000-0000-000000000000' # i = '00000000-0000-0000-0000-000000000000'
# i = '8a517deb7c54ac34e4a3e21f84ab6aae84d7696e' # i = '8a517deb7c54ac34e4a3e21f84ab6aae84d7696e'
# i = 'IFV_05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew' # i = 'IFV_05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew'
...@@ -48,58 +56,58 @@ for _ in range(1): ...@@ -48,58 +56,58 @@ for _ in range(1):
p1 = ''.join(str(random.choice(range(10))) for _ in range(12)) p1 = ''.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))
# 随机生成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 = '222.5.94.150' # ip = '222.5.94.150'
# mac = '0f607264fc6318a92b9e13c65db7cd3c' # mac = '0f607264fc6318a92b9e13c65db7cd3c'
try: try:
parms = { parms = {
# 点击时间 # 点击时间
'click_time': str(round(time.time() * 1000)), 'click_time': str(round(time.time() * 1000)),
'idfa': i, 'idfa': i,
# 'idfa_MD5': '4f17acf12727bfb060422996db969365', 'idfa_MD5': computeMD5upper(i),
# 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287', # 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287',
# 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607', # 'muid':i,
# 'muid':i, # 'oaid':'654324352124312232',
# 'oaid':'654324352124312232', # 'oaid_MD5': 'FCAF473729CE701E95A9422F5FBCD607',
'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)',
# ios # ios
# 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) # 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)
# android # android
# Mozilla/5.0 (Linux; U; Android 7.0; zh-cn; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36 # Mozilla/5.0 (Linux; U; Android 7.0; zh-cn; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36
# 'ry_adgroup_name': ry_adgroup_name, # 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name, # 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name, # 'ry_adcreative_name': ry_adcreative_name,
# "ry_adgroup_id": ry_adgroup_id, # "ry_adgroup_id": ry_adgroup_id,
# "ry_adplan_id": ry_adplan_id, # "ry_adplan_id": ry_adplan_id,
# "ry_adcreative_id": ry_adcreative_id, # "ry_adcreative_id": ry_adcreative_id,
#'mac': mac # 'mac': mac
} }
#timeout可以超时四秒 # timeout可以超时四秒
p = requests.get(url=URL,params=parms,timeout=4, verify=False) p = requests.get(url=URL, params=parms, timeout=4, verify=False)
print('success:',s) print('success:', s)
print('idfa:',i) print('idfa:', i)
print('ip:',ip) print('idfa_MD5:', computeMD5upper(i))
print('ip:', ip)
# print(p.content) # print(p.content)
# print(p.url) # print(p.url)
s=s+1 s = s + 1
except Exception as err: except Exception as err:
print(err) print(err)
print('wrong:',w) print('wrong:', w)
print('idfa:', i) print('idfa:', i)
print('ip', ip) print('ip', ip)
w=w+1
time.sleep(10)
try:
allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey)
except Exception:
print('install_wrong:', w)
w = w + 1 w = w + 1
# time.sleep(10)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# time.sleep(3) # time.sleep(3)
# try: # try:
# allEvent().adshow(i, ip, appkey,adid) # allEvent().adshow(i, ip, appkey,adid)
...@@ -166,11 +174,3 @@ for _ in range(1): ...@@ -166,11 +174,3 @@ for _ in range(1):
# except Exception: # except Exception:
# print('订单_wrong:', w) # print('订单_wrong:', w)
# print("结束时间" + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')) # print("结束时间" + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
...@@ -39,7 +39,7 @@ data = [ ...@@ -39,7 +39,7 @@ data = [
"application_info": { "application_info": {
# 线上- # 线上-
# 测试- # 测试-
"appkey": "904305d99f74ce0349b11238f3eeff69", "appkey": "2a33891fd3ea53f8edb0fca391a2432e",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
"channel_name": "default" "channel_name": "default"
...@@ -146,17 +146,7 @@ data = [ ...@@ -146,17 +146,7 @@ data = [
"iad_error_info": "xxx" "iad_error_info": "xxx"
}, },
"adservices_info": { "adservices_info": {
"token": "sbBoZZnCpY3Ps32Xv8K5PhyZtPKxB8i/rmjJfWATPQAuqawcQLalTgJ4Zaa4LzZohZK/bWxWg3TmynLv3XKAO+oTbn7FGmSdYAAAAVADAAAA/QAAAIAjeU4Eb6GRAsnafeLL8Ucpfzz5ErqPpxV4n5SoZ6n3q9U8tYixHXKsOcSFnEjBVYNX60xFABXS62TzYQieVzkjt4vjC6GYedWDX+IuYx7K4p6iUvUg5FAhX6kSeVF627i2Xj6Ie5K7Xi3LSM8uNWvADZQESKvdkWF9CQoNY37dEgAAABJfluG0V1jsF3OcqXJPotzTE1YAAACfAe5iGXrTDo893L1XIXjACtCXvdjaAAAAhgAGP0aWIK/sat96xlkNAzEZ8WJd/AGhKQCKZ7dTc+NvyRyic1WsAryc6dkpfhzKUot2l9wrft8I/+dRLggPPFGTTmgdXzaabldMH4iVdaIRDtVQPsxTQw1naa1ainIrehF/VXVsUgngZ0ONhi01Bqw75hq2yuyWRGb1CXkm0dlCtR8L8DVXAAAAAAAAAAAAAAAAAAABBEYXAAA=", "token": "sbBoZZnCpY3Ps32Xv8K5PhyZtPKxB8i/rmjJfWATPQAuqawcQLalTgJ4Zaa4LzZohZK/bWxWg3TmynLv3XKAO+oTbn7FGmSdYAAAAVADAAAA/QAAAIAjeU4Eb6GRAsnafeLL8Ucpfzz5ErqPpxV4n5SoZ6n3q9U8tYixHXKsOcSFnEjBVYNX60xFABXS62TzYQieVzkjt4vjC6GYedWDX+IuYx7K4p6iUvUg5FAhX6kSeVF627i2Xj6Ie5K7Xi3LSM8uNWvADZQESKvdkWF9CQoNY37dEgAAABJfluG0V1jsF3OcqXJPotzTE1YAAACfAe5iGXrTDo893L1XIXjACtCXvdjaAAAAhgAGP0aWIK/sat96xlkNAzEZ8WJd/AGhKQCKZ7dTc+NvyRyic1WsAryc6dkpfhzKUot2l9wrft8I/+dRLggPPFGTTmgdXzaabldMH4iVdaIRDtVQPsxTQw1naa1ainIrehF/VXVsUgngZ0ONhi01Bqw75hq2yuyWRGb1CXkm0dlCtR8L8DVXAAAAAAAAAAAAAAAAAAABBEYXAAA=",
"attribution": 'true',
"orgId": 40669820,
"campaignId": 542370539,
"conversionType": "Download",
"clickDate": "2020-04-08T17:17Z",
"adGroupId": 542317095,
"countryOrRegion": "US",
"keywordId": 87675432,
"adId": 542317136,
"adservices_retry_times": 3, "adservices_retry_times": 3,
"adservices_error_info": "xxx" "adservices_error_info": "xxx"
} }
......
...@@ -102,9 +102,9 @@ def send_request(cs): ...@@ -102,9 +102,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/I3eYvea' + 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)
print(response.url) print(response.url)
......
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