Commit ae39259b by liuxiaoxing

Merge remote-tracking branch 'remotes/origin/recieveandroid-se' into receiveios-asa

# Conflicts: # microservices/receiveandroid.py # microservices/receiveios.py 合并asa和se代码
parent 105ee656
...@@ -19,6 +19,9 @@ def code_nums2(n=6): ...@@ -19,6 +19,9 @@ def code_nums2(n=6):
s = str(random.choice([num])) s = str(random.choice([num]))
ret += s ret += s
return ret return ret
# from jiami.md5 import get_str_sha1_secret_str # from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据 # 向短链发送点击数据
# 广告创意ID # 广告创意ID
...@@ -35,8 +38,8 @@ ry_adplan_name = 'c测试1' ...@@ -35,8 +38,8 @@ 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/V3Q7bqa?noredirect=true' # URL = 'http://52.80.137.106:8083/tkio/euAVfua?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/A3QzEva?noredirect=true' URL = 'http://uri6.com/tkio/vMn2eea?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 # callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
...@@ -57,7 +60,7 @@ def computeMD5upper(message): ...@@ -57,7 +60,7 @@ def computeMD5upper(message):
return m.hexdigest().upper() return m.hexdigest().upper()
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd' appkey = '3f2706b7afdf89d95ffa7d2e9cc13e2e'
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
...@@ -98,9 +101,10 @@ for index in range(1): ...@@ -98,9 +101,10 @@ for index in range(1):
# ip = '156.119.456.190' # ip = '156.119.456.190'
try: try:
parms = { parms = {
'click_time':str(round(time.time() * 1000)), 'click_time': str(round(time.time() * 1000)),
# 'androidid': '86ab7f6642bdde717709216e68d0b', # 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei': i, 'imei': i,
'callback_param': 'EPHk9cX3pv4CGJax4ZENKI7w4MDev_4C',
# 'imei_MD5': computeMD5upper(i), # 'imei_MD5': computeMD5upper(i),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****', # 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试', # 'clickid': '测试测试',
...@@ -186,14 +190,14 @@ for index in range(1): ...@@ -186,14 +190,14 @@ 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
# # # #
# # # #
# time.sleep(5) # time.sleep(5)
...@@ -270,20 +274,14 @@ for index in range(1): ...@@ -270,20 +274,14 @@ for index in range(1):
# num = index + 1 # num = index + 1
# event = 'event_' + str(num) # event = 'event_' + str(num)
# event = 'event_1' event = 'event_30'
# time.sleep(3) time.sleep(3)
# try: try:
# allEvent().ziding_event(i, ip, appkey, event) allEvent().ziding_event(i, ip, appkey, event)
# print(event) print(event)
# except Exception as err: except Exception as err:
# print(err) print(err)
# print('自定义_wrong:', w) print('自定义_wrong:', w)
# time.sleep(6) # time.sleep(6)
# try: # try:
......
...@@ -398,7 +398,7 @@ class allEvent: ...@@ -398,7 +398,7 @@ class allEvent:
# 识别是否为自定义事件,默认传1 # 识别是否为自定义事件,默认传1
'_isreyundefaultevent': '1', '_isreyundefaultevent': '1',
# 'who': 'lxxtest', # 'who': 'lxxtest',
'param1': '1', 'param7': '5',
}, },
......
...@@ -8,7 +8,7 @@ import hashlib ...@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活 #安卓常规渠道激活
appkey = 'b7c0146c5b14d7d6d87cfd9bf1853b3e' appkey = '3f2706b7afdf89d95ffa7d2e9cc13e2e'
# 线上预约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 = '686032665843'
# 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,11 +48,11 @@ for index in range(1): ...@@ -48,11 +48,11 @@ 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)
# allEvent().registerEvent(i, ip, appkey) # allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey) # allEvent().payEvent(i, ip, appkey)
...@@ -61,8 +61,8 @@ for index in range(1): ...@@ -61,8 +61,8 @@ 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_6' event = 'event_30'
# 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
# time.sleep(3) # time.sleep(3)
......
...@@ -995,7 +995,7 @@ def test_atb42(): ...@@ -995,7 +995,7 @@ def test_atb42():
g = code_nums(36) g = code_nums(36)
redirectandroid.parms['gaid'] = g redirectandroid.parms['gaid'] = g
redirectandroid.parms['imei1'] = q redirectandroid.parms['imei1'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['gaid'] = g receiveandroid.data[0]['device_info']['gaid'] = g
receiveandroid.data[0]['device_info']['device_id'] = g receiveandroid.data[0]['device_info']['device_id'] = g
...@@ -1009,7 +1009,7 @@ def test_atb43(): ...@@ -1009,7 +1009,7 @@ def test_atb43():
a = code_nums(16) a = code_nums(16)
redirectandroid.parms['android_id'] = a redirectandroid.parms['android_id'] = a
redirectandroid.parms['imei1'] = q redirectandroid.parms['imei1'] = q
redirectandroid.send_request3("73iIZ3a", '') redirectandroid.send_request3('')
time.sleep(10) time.sleep(10)
receiveandroid.data[0]['device_info']['android_id'] = a receiveandroid.data[0]['device_info']['android_id'] = a
receiveandroid.data[0]['device_info']['device_id'] = a receiveandroid.data[0]['device_info']['device_id'] = a
......
...@@ -48,7 +48,7 @@ data = [ ...@@ -48,7 +48,7 @@ data = [
"application_info": { "application_info": {
# 线上-a8ed96ae9051499fd98bc46ab9c9495c # 线上-a8ed96ae9051499fd98bc46ab9c9495c
# 测试-decbeb4d840b4bcd1a068ca7233e6ac2 # 测试-decbeb4d840b4bcd1a068ca7233e6ac2
"appkey": "2a33891fd3ea53f8edb0fca391a2432e", "appkey": "ea5f9f976bc7e58adcb39effc5a405e3",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
"channel_name": "HUAWEI" "channel_name": "HUAWEI"
...@@ -142,7 +142,7 @@ def send_request(): ...@@ -142,7 +142,7 @@ def send_request():
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)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data) print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data)) response = requests.request("POST", url, headers=headers, data=json.dumps(data))
...@@ -157,8 +157,9 @@ def send_request(): ...@@ -157,8 +157,9 @@ def send_request():
def send_request2(): def send_request2():
global data global data
url = "http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk" # url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000)) data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print(data) print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data)) response = requests.request("POST", url, headers=headers, data=json.dumps(data))
......
...@@ -37,8 +37,6 @@ global data ...@@ -37,8 +37,6 @@ global data
data = [ data = [
{ {
"application_info": { "application_info": {
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-55705dbd45dd246751b87bba94b8c73c
"appkey": "2a33891fd3ea53f8edb0fca391a2432e", "appkey": "2a33891fd3ea53f8edb0fca391a2432e",
"bundleid": "3423232", "bundleid": "3423232",
"app_version": "1.9.0", "app_version": "1.9.0",
......
...@@ -117,7 +117,7 @@ def send_request(dl, cs): ...@@ -117,7 +117,7 @@ def send_request(dl, cs):
# 302跳转时用该方法 # 302跳转时用该方法
def send_request2(): def send_request2():
url1 = 'http://tmtest.trackingio.com/receive/turl/Nja2aaa' url1 = 'http://tmtest.trackingio.com/receive/turl/QN3eQba'
# 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)
...@@ -128,9 +128,9 @@ def send_request2(): ...@@ -128,9 +128,9 @@ def send_request2():
def send_request3(cs): def send_request3(cs):
global parms global parms
# 测试 # 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/B73uQja' + cs url1 = 'http://tmtest.trackingio.com/receive/turl/QN3eQba' + cs
# 线上 # 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a' + cs # url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/MFBfqqa' + 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)
...@@ -141,11 +141,9 @@ def send_request3(cs): ...@@ -141,11 +141,9 @@ def send_request3(cs):
# 没有短链及参数要求的用该方法,测试环境默认参数为2586渠道短链
# appeky:0dd83bd5079ab3b20d9e66ebb195f6c4
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/QN3eQba'
# url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/vMvqE3a' # 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)
......
...@@ -87,9 +87,9 @@ data_temp = json.dumps(parms) ...@@ -87,9 +87,9 @@ data_temp = json.dumps(parms)
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/I3eYvea' + 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)
print(response.url) print(response.url)
...@@ -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/I3eYvea' + cs url1 = 'http://tmtest.trackingio.com/receive/turl/I3eYvea' + cs
# 线上 # 线上
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/qY7fQza' + cs # url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/qY7fQza' + 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