Commit 6fcb6197 by liuxiaoxing

日常测试

parent 0b9846c7
......@@ -25,11 +25,14 @@ def code_nums2(n=6):
# from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据
# 广告创意ID
ry_adcreative_id = code_nums2(6)
# ry_adcreative_id = code_nums2(6)
ry_adcreative_id = '453282367872'
# 广告组ID
ry_adgroup_id = code_nums2(6)
# ry_adgroup_id = code_nums2(6)
ry_adgroup_id = '203346609'
# 广告计划ID
ry_adplan_id = code_nums2(6)
# ry_adplan_id = code_nums2(6)
ry_adplan_id = '7138970403'
# 广告组名称
ry_adgroup_name = 'c测试1'
# 广告计划名称
......@@ -38,8 +41,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/ieMryea?noredirect=true'
# URL = 'http://52.80.137.106:8083/tkio/mYrAzqa?noredirect=true'
# URL = 'http://uri6.com/tkio/uq2uQna?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/AZRvA3a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
......@@ -60,16 +63,16 @@ def computeMD5upper(message):
return m.hexdigest().upper()
appkey = '8a390227254c03dbcaddbca009cd6e8b'
appkey = '88d7d29c4c7a49d2b5ec8d9723f70eb1'
lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0
w = 0
for index in range(1):
for index in range(10):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '044792973102'
# i = '%*%5323423332233'
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))
......@@ -77,7 +80,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 = '0426886726981'
# accountid = '37655892'
# p1 = '测试一下'
# "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# "idfa": '00000000-0000-0000-0000-000000000000',
......@@ -101,7 +104,9 @@ for index in range(1):
# ip = '156.119.456.190'
try:
parms = {
# 'click_time': str(round(time.time() * 1000)),
'click_time': str(round(time.time() * 1000)),
# 'click_time': '1666271211',
# 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei': i,
# 'callback_param': 'EPHk9cX3pv4CGJax4ZENKI7w4MDev_4C',
......@@ -118,7 +123,7 @@ for index in range(1):
# 'vid': '7653236654354534rffdvdv!@#¥%@测试测试'
# 'cached_caid': '00_A2FF034AEDF1403205A4A6A1118CDA67_A66338F33BEBB40F5CD65F198AF2F44C',
# "idfv": 'CB389725-0029-4A35-8E38-D142F836B626',
"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/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36",
"ua": "Mozilla%2F5.0+%28iPhone%3B+CPU+iPhone+OS+13_4_1+like+Mac+OS+X%29+AppleWebKit%2F605.1.15+%28KHTML%2C+like+Gecko%29+Mobile%2F15E148+aweme_20.3.0+Region%2FCN+AppTheme%2Fdark+NetType%2F4G+JsSdk%2F2.0+Channel%2FApp+ByteLocale%2F",
# 'creativeId':'21321321312123',
# 'requestId':'312321321312',
# 'adId': long('21231'),
......@@ -129,7 +134,7 @@ for index in range(1):
"ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id": ry_adplan_id,
"ry_adcreative_id": ry_adcreative_id,
# 账户id
# # # 账户id
"accountid": accountid
# 'imei2': 'null',
# 'meid': i
......@@ -139,11 +144,11 @@ for index in range(1):
# 'mac': "5432453241421",
# 子渠道
# 'subchannel': '2000',
# 计划
# # 计划
# 'aid': '888',
# 广告位
# # 广告位
# 'siteid': '777',
# 流量来源
# # 流量来源
# 'csite': '666',
# "timestamp": "1569141628027",
# "creative": "31096865315",
......@@ -195,16 +200,26 @@ for index in range(1):
# print('androidid', a)
w = w + 1
time.sleep(6)
try:
allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey)
# time.sleep(6)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# # # # #
# # # # #
# time.sleep(10)
# try:
# allEvent().invoke_test(i, ip, appkey)
# except Exception:
# print('install_wrong:', w)
# w = w + 1
except Exception:
print('install_wrong:', w)
w = w + 1
# # # #
# # # #
# time.sleep(5)
# try:
# allEvent().registerEvent(i, ip, appkey)
......@@ -216,7 +231,7 @@ for index in range(1):
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
# time.sleep(5)
# time.sleep(3)
# try:
# allEvent().payEvent(i, ip, appkey)
# except Exception as err:
......@@ -227,19 +242,14 @@ for index in range(1):
# allEvent().payorder(i, ip, appkey)
# except Exception:
# print('订单_wrong:', w)
# time.sleep(10)
# time.sleep(3)
# try:
# allEvent().invoke_test(i, ip, appkey)
# allEvent().retentionEvent(i,ip,appkey)
# except Exception:
# print('install_wrong:', w)
# print('retention',w)
# w = w + 1
# # time.sleep(3)
# # try:
# # allEvent().retentionEvent(i,ip,appkey)
# # except Exception:
# # print('retention',w)
# # w = w + 1
# time.sleep(3)
# try:
# allEvent().adshow(i, ip, appkey,adid)
......@@ -276,10 +286,10 @@ for index in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
#
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_24'
# # event = 'event_' + str(num)
# event = 'event_28'
# time.sleep(3)
# try:
# allEvent().ziding_event(i, ip, appkey, event)
......@@ -294,8 +304,13 @@ for index in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
#
#
# time.sleep(2)
# try:
# allEvent().H5reged(i, ip, appkey)
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# time.sleep(5)
# try:
# allEvent().H5download(i, ip, appkey)
......@@ -309,7 +324,7 @@ for index in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
#
# time.sleep(5)
# try:
# allEvent().h5loginEvent(i, ip, appkey)
......
from datetime import date
import requests
import json
import time
......@@ -7,9 +9,9 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch = 'http://10.3.20.42:8080/receive/batch'
URL = 'http://52.80.137.106:8080/receive/tkio/'
# URL = 'http://52.80.137.106:8080/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://120.53.212.71/receive/tkio/'
# 腾迅云tkio http协议的生产地址:
......@@ -38,14 +40,14 @@ paymenttype = 'alipay'
# 货币类型
currencytype = 'CNY'
# 支付的货币金额
currencyamount = '90'
currencyamount = '90.3455'
# # 填充广告在变现平台的广告位ID
# adid = '839296815'
# 填充广告的变现平台,例如穿山甲(csj)、优量汇(ylh)、百青藤(bqt)、Sigmob(sigmob)、快手(ks)、Mintegral(mintegral)、OneWay(oneway)、Vungle(vungle)等
adPlatform = 'ylh'
# 页面展示时调用 pageID代表页面唯一标识
# 会话时长,单位秒
appduration = '600'
appduration = '214706243425'
# 时长,单位:秒
pageduration = '200'
istablet = 'phone'
......@@ -69,6 +71,7 @@ class allEvent:
# "what":'install',
"appid": appkey,
"context": {
# "_apptype": "quickApp",
"_carrier": carrier,
"_networkwhat_type": network_type,
"_ryosversion": ryosversion,
......@@ -77,9 +80,9 @@ class allEvent:
# "_campaignid": 'default',
"_deviceid": i,
"_imei": i,
"_meid":i,
"_meid":'UNKNOWN',
"mobdna_info": "{\"mobdna_oid\":\"95820f88217ec8cbdf621919bb81c0a5\",\"mobdna_appkey\":\"16dc0cb882d3dbec4f7f66251a84d6dd\",\"mobdna_rdid\":\"96AD0BC02C70D0BA5C446C12580E3800\",\"mobdna_requestid\":\"463cfd5564d24d30a607a18a1e8ae2d8\"}",
# '_oaid': '697134960e9ff8df46f21b4f97db595a1',
'_oaid': i,
# "_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',
# "idfa": i,
......@@ -163,6 +166,8 @@ class allEvent:
# 'ds': ds,
'who': 'lxx_test'
})
try:
p = requests.post(url=URL + 'install', data=s, headers=headers, timeout=5)
......@@ -268,8 +273,8 @@ class allEvent:
'context': {
# "_apptype": "wap",
'_deviceid': i,
'_imei': i,
"_meid": "1232112221",
'_imei': 'UNKNOWN',
"_meid": 'UNKNOWN',
# "_idfv": i,
# '_androidid':i,
'_ip': IP,
......@@ -325,6 +330,8 @@ class allEvent:
'what': 'payment',
'appid': appkey,
'context': {
# "_apptype": "quickApp",
'_deviceid': i,
'_imei': i,
'_androidid': i,
......@@ -441,6 +448,7 @@ class allEvent:
# "appType": "wx",
'appid': appkey,
'context': {
"_apptype": "quickApp",
# "_apptype": "wx",
'_deviceid': i,
'_imei': i,
......@@ -668,7 +676,7 @@ class allEvent:
'_resolution': resolution,
'_op': op,
'_timestamp': current_time_13,
'_oaid': '999b6e3e-a274-ed22-cebf-2b6dddfc29b7'
'_oaid': i
# '_mac':"565354131606"
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
......@@ -788,9 +796,9 @@ class allEvent:
"appType": "wap",
"appid": appkey,
"context": {
"_campaignid": "705b4af0976627e2292a56d402cb1d6b",
# "_campaignid": "705b4af0976627e2292a56d402cb1d6b",
"_deviceid": i,
"_cid": "20899",
# "_cid": "20899",
# "_ry_ts": "1588130655311",
"_tz": "+8",
"_ip": IP,
......@@ -801,7 +809,7 @@ class allEvent:
},
"where": "event",
"deviceid": i,
"when": when,
# "when": when,
"ds": ds,
"who": "552317006484"
})
......@@ -966,4 +974,39 @@ class allEvent:
p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5)
print("pv:" + p.text)
except Exception as err:
print(err)
# h5
def H5reged(self, i, IP, appkey):
s = json.dumps({
"what": "register",
"appType": "wap",
"appid": appkey,
"context": {
"name": 'Sherry3',
"mobile": '中国移动',
"source": '商务沟通',
# "_campaignid": "_default_",
"_deviceid": i,
# "_cid": "-1",
# "_ry_ts": "1588130655311",
"_tz": "+8",
"_ip": IP,
"_apptype": "wap",
# "_campaignid_bak": "_default_",
"_ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36",
# "_cid_bak": "-1"
},
"where": "event",
"deviceid": i,
"when": when,
"ds": ds,
"who": "552317006484"
})
try:
p = requests.post(url=URL + 'event', data=s, headers=headers, timeout=5)
print("pv:" + p.text)
except Exception as err:
print(err)
\ No newline at end of file
from datetime import date
from android_event.android_script import allEvent
import struct
import socket
......@@ -8,7 +10,7 @@ import hashlib
#安卓常规渠道激活
appkey = 'b34100cdf5b586774e5d4dd4357c7b17'
appkey = '83c18356b6ab202f007565b821e43e10'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
......@@ -27,7 +29,7 @@ appkey = 'b34100cdf5b586774e5d4dd4357c7b17'
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# allEvent().payEvent(i, ip, appkey)
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
for index in range(1):
# 随机生成12为数组
s = ''.join(str(random.choice(range(10))) for _ in range(18))
......@@ -38,20 +40,22 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
i = 'R2G4QK6J866RLP956230ND71ML1H5UZ0'
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '778980150907'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '124.158.98.207'
# ip = '109.64.182.29'
# 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
allEvent().installUpload(i, ip, appkey)
# time.sleep(1)
# allEvent().startupEvent(i, ip, appkey)
# start_time = time.time()
# allEvent().installUpload(i, ip, appkey)
# # print("time===>",(time.time()-start_time))
# # time.sleep(1)
# allEvent().startupEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().loginEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().registerEvent(i, ip, appkey)
......@@ -76,11 +80,13 @@ for index in range(1):
# allEvent().formevent(i,ip,appkey)
# allEvent().batchUpload(i,ip,appkey)
# allEvent().H5download(i,ip,appkey)
# time.sleep(1)
# allEvent().H5pv(i,ip,appkey)
# # time.sleep(1)
allEvent().H5pv(i,ip,appkey)
# # time.sleep(1)
# #
# allEvent().H5su(i,ip,appkey)
# allEvent().H5reged(i,ip,appkey)
print("imei:"+i)
# print("pageid:"+p)
# print(s)
......
......@@ -8,10 +8,10 @@ import time
#向短链发送点击数据
#!!!!分包需要删掉https的s
URL = 'http://uri6.com/tkio/VFf22ea?noredirect=true'
# URL = 'http://52.80.137.106:8083/tkio/6JZBBva?noredirect=true'
# URL = 'http://uri6.com/tkio/3uu6rya?noredirect=true'
URL = 'http://52.80.137.106:8083/tkio/RvYNJna?noredirect=true'
appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
appkey = '5b0e99269160e67ef8e560716221e142'
# event = 'invoke'
cmpaignid = '111'
# 广告创意ID
......@@ -98,16 +98,16 @@ for index in range(1):
# print('注册_wrong:', w)
# print(e)
# # continue
time.sleep(8)
try:
allEvent().loginEvent(i, ip, appkey)
except Exception:
print('登录_wrong:', w)
# time.sleep(5)
# time.sleep(8)
# try:
# allEvent().payEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('付费_wrong:', w)
# print('登录_wrong:', w)
time.sleep(5)
try:
allEvent().payEvent(i, ip, appkey)
except Exception:
print('付费_wrong:', w)
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_28'
......
......@@ -5,8 +5,8 @@ import random
headers = {'Content-Type': 'application/json'}
# URL = 'http://52.80.137.106:8080/receive/tkio/'
URL = 'http://log.trackingio.com/receive/tkio/'
URL = 'http://52.80.137.106:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://120.53.212.71/receive/tkio/'
# URL = 'http://tlog.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
......@@ -52,6 +52,8 @@ class allEvent:
# "what":'install',
"appid": appkey,
"context": {
"_apptype": "quickApp",
'_category': 'APPMARKET',
"_campaignid": cmpaignid,
# "_channelid": cmpaignid,
......@@ -167,6 +169,8 @@ class allEvent:
'what': 'payment',
'appid': appkey,
'context': {
"_apptype": "quickApp",
'_deviceid': i,
'_imei': i,
'_androidid': i,
......
......@@ -5,12 +5,12 @@ import random
import time
import time
#安卓分包激活
appkey = 'a4dc9f231c68d496bcdd54af12557ad6'
appkey = 'f461b1ab7aca6fdf3fa719bf4b6af863'
#57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid = '111'
cmpaignid = '1111'
for index in range(1):
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12))
......
......@@ -47,9 +47,9 @@ for _ in range(1):
d = "".join(random.sample(string.ascii_letters + string.digits, 4))
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 = '8a517deb7c54ac34e4a3e21f84ab6aae84d7696e'
i = '8a517deb444'
# i = 'IFV_05B50501-E0FC-4B83-BE74-F18ACEDEF37Bwew'
adid = ''.join(str(random.choice(range(10))) for _ in range(12))
......@@ -66,7 +66,7 @@ for _ in range(1):
# 点击时间
'click_time': str(round(time.time() * 1000)),
'idfa': i,
'idfa_MD5': computeMD5upper(i),
# 'idfa_MD5': computeMD5upper(i),
# 'idfv': 'IFV_64F5A794-A942-4209-81B0-D28FD01E9287',
# 'muid':i,
# 'oaid':'654324352124312232',
......@@ -100,14 +100,14 @@ for _ in range(1):
print('idfa:', i)
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
# 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)
# try:
# allEvent().adshow(i, ip, appkey,adid)
......@@ -144,33 +144,33 @@ for _ in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
time.sleep(2)
try:
allEvent().registerEvent(i, ip, appkey)
except Exception as e:
print('注册_wrong:', w)
print(e)
time.sleep(2)
try:
allEvent().loginEvent(i, ip, appkey)
except Exception:
print('登录_wrong:', w)
# time.sleep(10)
# time.sleep(2)
# try:
# allEvent().registerEvent(i, ip, appkey)
# except Exception as e:
# print('注册_wrong:', w)
# print(e)
# time.sleep(2)
# try:
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
# # time.sleep(10)
# # try:
# # allEvent().ziding_event(i, ip, appkey, event)
# # except Exception as err:
# # print(err)
# # print('自定义_wrong:', w)
# #
# time.sleep(2)
# try:
# allEvent().ziding_event(i, ip, appkey, event)
# allEvent().payEvent(i, ip, appkey)
# except Exception as err:
# print(err)
# print('自定义_wrong:', w)
#
time.sleep(2)
try:
allEvent().payEvent(i, ip, appkey)
except Exception as err:
print(err)
print('付费_wrong:', w)
time.sleep(2)
try:
allEvent().payorder(i, ip, appkey)
except Exception:
print('订单_wrong:', w)
# print('付费_wrong:', w)
# time.sleep(2)
# try:
# allEvent().payorder(i, ip, appkey)
# except Exception:
# print('订单_wrong:', w)
# print("结束时间" + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
......@@ -8,8 +8,8 @@ import random
headers = {'Content-Type': 'application/json'}
# 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://52.80.137.106:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
......@@ -93,51 +93,51 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload
# "iad-conversion-type": "Download",
#
# # 广告活动组ID(campaign group id)
# "iad-org-id": "123456789",
# # 广告活动组名称(campaign group name)
# "iad-org-name": "name",
#
# # 广告活动ID
# "iad-campaign-id": "111",
# # 广告活动名称
# "iad-campaign-name": "CampaignName",
#
#
# # 广告组ID
# "iad-adgroup-id": "111111",
# # 广告组名称
# "iad-adgroup-name": "AdGroupName",
#
#
# # 关键词 id
# "iad-keyword-id": "111",
# # 关键词
# "iad-keyword": "Keyword",
#
#
# # 素材ID
# "iad-creativeset-id": "111",
# # 素材名称
# "iad-creativeset-name": "CreativeSetName",
#
# # 点击ASA广告时间
# "iad-click-date": '2021-06-24T11:32:33Z',
# # 本次下载完成的时间(仅ASA转化时,该值传且必传)
# "iad-conversion-date": when,
#
# # Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# # 关键词匹配类型
# "iad-keyword-matchtype": "SearchMatch",
# #首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
# "iad-purchase-date": '2021-06-24T11:32:33Z',
# # 归因结果
# "iad-attribution": "true",
# # 国家
# "iad-country-or-region": "US",
# 'asa_install_time':'2021-06-24T11:32:33Z',
"iad-conversion-type": "Download",
# 广告活动组ID(campaign group id)
"iad-org-id": "123456789",
# 广告活动组名称(campaign group name)
"iad-org-name": "name",
# 广告活动ID
"iad-campaign-id": "111",
# 广告活动名称
"iad-campaign-name": "CampaignName",
# 广告组ID
"iad-adgroup-id": "111111",
# 广告组名称
"iad-adgroup-name": "AdGroupName",
# 关键词 id
"iad-keyword-id": "111",
# 关键词
"iad-keyword": "Keyword",
# 素材ID
"iad-creativeset-id": "111",
# 素材名称
"iad-creativeset-name": "CreativeSetName",
# 点击ASA广告时间
"iad-click-date": '2021-06-24T11:32:33Z',
# 本次下载完成的时间(仅ASA转化时,该值传且必传)
"iad-conversion-date": when,
# Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# 关键词匹配类型
"iad-keyword-matchtype": "SearchMatch",
#首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
"iad-purchase-date": '2021-06-24T11:32:33Z',
# 归因结果
"iad-attribution": "true",
# 国家
"iad-country-or-region": "US",
'asa_install_time':'2021-06-24T11:32:33Z',
......
......@@ -6,10 +6,10 @@ import string
import time
#iOS常规渠道激活
appkey = 'd7fbbb5410a9b70754c9d1e8f16741b3'
appkey = '0ecc232109dc25bfedff8aba06271539'
event = 'event_1'
for index in range(1):
for index in range(5):
# 随机生成12为数组
a = "".join(random.sample(string.ascii_letters + string.digits, 8))
b = "".join(random.sample(string.ascii_letters + string.digits, 4))
......@@ -27,16 +27,20 @@ for index in range(1):
allEvent().installUpload(i,ip,appkey)
# allEvent().startupEvent(i, ip, appkey)
# time.sleep(10)
# time.sleep(2)
# allEvent().loginEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().registerEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().payEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# time.sleep(3)
# num = index + 1
# event = 'event_' + str(num)
# # num = index + 1
# # event = 'event_' + str(num)
# event = 'event_1'
# allEvent().ziding_event(i, ip, appkey, event)
# print(event)
print(event)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().pageduration(i,ip,appkey,se,p)
......
......@@ -49,8 +49,8 @@ def test_imei1():
clickandroid.parms['androidid'] = androidid
clickandroid.parms['mac'] = mac
clickandroid.parms['ip'] = ip
# clickandroid.send_requestandroid('')
clickandroid.send_requestandroid('&preorder=true')
clickandroid.send_requestandroid('')
# clickandroid.send_requestandroid('&preorder=true')
time.sleep(6)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
......@@ -85,8 +85,8 @@ def test_imei2():
clickandroid.parms['mac'] = mac
clickandroid.parms['muid'] = i
clickandroid.parms['ip'] = ip
# clickandroid.send_requestandroid('')
clickandroid.send_requestandroid('&preorder=true')
clickandroid.send_requestandroid('')
# clickandroid.send_requestandroid('&preorder=true')
time.sleep(5)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
......@@ -112,8 +112,8 @@ def test_imei3():
clickandroid.parms['mac'] = mac
clickandroid.parms['muid'] = ''
clickandroid.parms['ip'] = ip
# clickandroid.send_requestandroid('')
clickandroid.send_requestandroid('&preorder=true')
clickandroid.send_requestandroid('')
# clickandroid.send_requestandroid('&preorder=true')
time.sleep(5)
tkioreceiveandroid.data['context']['_deviceid'] = i
......@@ -680,7 +680,7 @@ def test_fenbao():
oaid = code_nums1(15)
mac = code_nums1(32)
androidid = code_nums1(16)
campaignid = '1111'
campaignid = '1122'
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
......@@ -827,11 +827,12 @@ def test_atboaid():
clickandroid.parms['muid'] = ''
clickandroid.parms['ip'] = ip
clickandroid.send_requestandroid('')
time.sleep(5)
time.sleep(6)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
tkioreceiveandroid.data['context']['_oaid'] = oaid
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -851,11 +852,12 @@ def test_atboaidmd5():
clickandroid.parms['muid'] = ''
clickandroid.parms['ip'] = ip
clickandroid.send_requestandroid('')
time.sleep(5)
time.sleep(6)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
tkioreceiveandroid.data['context']['_oaid'] = oaid
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -875,11 +877,13 @@ def test_atbandroidid():
clickandroid.parms['muid'] = ''
clickandroid.parms['ip'] = ip
clickandroid.send_requestandroid('')
time.sleep(5)
time.sleep(6)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
tkioreceiveandroid.data['context']['_androidid'] = androidid
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -900,12 +904,14 @@ def test_atbandroididmd5():
clickandroid.parms['muid'] = ''
clickandroid.parms['ip'] = ip
clickandroid.send_requestandroid('')
time.sleep(5)
time.sleep(6)
tkioreceiveandroid.data['context']['_deviceid'] = i
tkioreceiveandroid.data['context']['_imei'] = i
tkioreceiveandroid.data['context']['_oaid'] = oaid
tkioreceiveandroid.data['context']['_androidid'] = androidid
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -935,6 +941,7 @@ def test_atbmac():
tkioreceiveandroid.data['context']['_androidid'] = androidid
tkioreceiveandroid.data['context']['_mac'] = mac
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -964,6 +971,8 @@ def test_atbmacmd5():
tkioreceiveandroid.data['context']['_androidid'] = androidid
tkioreceiveandroid.data['context']['_mac'] = mac
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.data['context']['_apptype'] = 'quickApp'
tkioreceiveandroid.send_request()
print(i)
......@@ -1015,40 +1024,69 @@ def test_click():
mget = 'b34100cdf5b586774e5d4dd4357c7b17:'
# mget = ''
i = code_nums1(32)
# i = ''.join(str(random.choice(range(10))) for _ in range(16))
# i = code_nums1(32)
i = 'CM471A7C6B21F0369B5US8J8UV8P8SVD'
# mdi = '5DF50CF4C9E6BD1B5A42561C637DAEBE'
oaid = code_nums1(15)
# oaid = 'S96Z9721656VRIP'
# mdo = '8127886D006BB678853E0DC918E688CA'
mac = code_nums1(32)
androidid = code_nums1(16)
# mac = 'A05Q8GGG6572D861XEIB0869S56Q1VD7'
# androidid = code_nums1(16)
androidid='95J247G5ZQYM81Z8'
# mda = 'EB802DB3386F1CB75975F4D58667F70F'
muid = code_nums1(16)
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickandroid.parms['imei'] = i
clickandroid.parms['imei_MD5'] = computeMD5upper(i)
clickandroid.parms['oaid'] = oaid
clickandroid.parms['oaid_MD5'] = computeMD5upper(oaid)
clickandroid.parms['androidid'] = androidid
clickandroid.parms['androidid_MD5'] = computeMD5upper(androidid)
clickandroid.parms['mac'] = mac
clickandroid.parms['muid'] = muid
# muid='LGSM6ND543Q9JSZU'
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
ip = '58.243.117.39'
clickandroid.parms['click_time'] = '1663309200'
# clickandroid.parms['imei'] = i
# clickandroid.parms['imei_MD5'] = computeMD5upper(i)
# clickandroid.parms['imei_MD5'] = mdi
# clickandroid.parms['oaid'] = oaid
# clickandroid.parms['oaid_MD5'] = computeMD5upper(oaid)
# clickandroid.parms['oaid_MD5'] = mdo
# clickandroid.parms['androidid'] = androidid
# clickandroid.parms['androidid_MD5'] = computeMD5upper(androidid)
# # clickandroid.parms['androidid_MD5'] = mda
#
# clickandroid.parms['mac'] = mac
# clickandroid.parms['muid'] = muid
clickandroid.parms['ip'] = ip
clickandroid.send_requestandroid('')
print("imei: "+mget+i.upper())
print("imei_MD5: "+mget+computeMD5upper(i))
print("oaid: "+mget+oaid.upper())
print("oaid_MD5: "+mget+computeMD5upper(oaid))
print("mac: "+mget+mac.upper())
print("androidid: "+mget+androidid.upper())
print("androidid_MD5: "+mget+computeMD5upper(androidid))
print("muid: "+mget+muid.upper())
# print("imei: "+mget+i.upper())
# print("imei_MD5: "+mget+computeMD5upper(i))
# print("oaid: "+mget+oaid.upper())
# print("oaid_MD5: "+mget+computeMD5upper(oaid))
# print("mac: "+mget+mac.upper())
# print("androidid: "+mget+androidid.upper())
# print("androidid_MD5: "+mget+computeMD5upper(androidid))
# print("muid: "+mget+muid.upper())
print("ip: "+mget+ip)
def test_install():
# i = code_nums1(32)
i = 'S473DB51LO9719655O3F25123B7F6M59'
i = code_nums1(32)
# i = 'N9Q2T28P8RUVFJ6'
i2 = code_nums1(32)
oaid = code_nums1(15)
# oaid = code_nums1(15)
oaid = '5DB16249GAUJN7X'
mac = code_nums1(32)
androidid = code_nums1(16)
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
......@@ -1059,4 +1097,7 @@ def test_install():
tkioreceiveandroid.data['context']['_mac'] = mac
tkioreceiveandroid.data['context']['_ip'] = ip
tkioreceiveandroid.send_request()
print(i)
......@@ -170,8 +170,8 @@ def test_at5():
clickios.parms['idfa'] = ''
clickios.parms['ip'] = ip
clickios.parms['caid1'] = caid
# clickios.send_requestandroid('')
clickios.send_requestandroid('&preorder=true')
clickios.send_requestandroid('')
# clickios.send_requestandroid('&preorder=true')
time.sleep(6)
tkioreceive.data['context']['_deviceid'] = i
tkioreceive.data['context']['_idfa'] = i
......@@ -779,6 +779,89 @@ def test_at29():
# 网易云音乐 cid:10837
# 两个版本值都不为空且不相同
# 两个版本值都不为空且相同
# null值
# caid值为:20220111_null_2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207_null
# caid值为:20220111_null_2C20211207_null
# null值的MD5值
# caid值为:20220111_37a6259cc0c1dae299a7866489dff0bd_2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207_37a6259cc0c1dae299a7866489dff0bd
# caid值为:20220111_37a6259cc0c1dae299a7866489dff0bd_2C20211207_37a6259cc0c1dae299a7866489dff0bd
# NULL值
# caid值为:20220111_NULL_2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207_NULL
# caid值为:20220111_NULL_2C20211207_NULL
# NULL值的MD5值
# caid值为:20220111_6c3e226b4d4795d518ab341b0824ec29_2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207_6c3e226b4d4795d518ab341b0824ec29
# caid值为:20220111_6c3e226b4d4795d518ab341b0824ec29_2C20211207_6c3e226b4d4795d518ab341b0824ec29
# __YAID__值
# caid值为:20220111___YAID___2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207___YAID__
# caid值为:20220111___YAID___2C20211207___YAID__
# __YAID__的MD5值
# caid值为:20220111_8b68b8c298619130f0a7390f1627920c_2C20211207_33927d0a4d3b62ced1e1c2861a94891c
# caid值为:20220111_33927d0a4d3b62ced1e1c2861a94891c_2C20211207_8b68b8c298619130f0a7390f1627920c
# caid值为:20220111_8b68b8c298619130f0a7390f1627920c_2C20211207_8b68b8c298619130f0a7390f1627920c
def test_wyycaid():
i = idfacode()
ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickios.parms['idfa'] = i
clickios.parms['ip'] = ip1
clickios.parms['caid'] = '20220111_8b68b8c298619130f0a7390f1627920c%2C2C20211207_37a6259cc0c1dae299a7866489dff0b3'
clickios.send_requestandroid('')
print('点击')
# time.sleep(5)
# tkioreceive.data['context']['_deviceid'] = i
# tkioreceive.data['context']['_idfa'] = i
# tkioreceive.data['context']['_ip'] = ip1
# tkioreceive.data['context']['_caid1'] = '123456789012345'
# tkioreceive.data['context']['_caid2'] = '6789523654780214556'
# tkioreceive.data['context'][
# '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)'
# tkioreceive.send_request()
print(i)
# UC头条 cid:530,目前支持20220111 、20211207、20201230 以上 3 个版本,优先选择2022和2021版本,需要提取其中各版本caid的值存储在caid1,caid2中;
# caid值为单个id,版本为20220111:[{"version":"20220111","caid":"6baf30ee45a1511eccb5e90111d57d7b"}],caid取值为6baf30ee45a1511eccb5e90111d57d7b
# caid值为单个id,版本为20050111:[{"version":"20050111:","caid":"6baf30ee45a1511eccb5e90111d57d7b"}],caid取值为6baf30ee45a1511eccb5e90111d57d7b
# caid值为两个id,版本分别为2020和2003:[{"version":"20201230","caid":"6baf30ee45a1511eccb5e90111d57d7b"},{"version":"20031207","caid":" 779621032f9c06357f8f81fb09d181f2" }],caid1取值为6baf30ee45a1511eccb5e90111d57d7b,caid2取值为空
# caid值为三个id,版本分别为2020,2021,2022:[[{"version":"20201230","caid":"6baf30ee45a1511eccb5e90111d57d7b"},{"version":"20211207","caid":" 779621032f9c06357f8f81fb09d181f2" },{"version":"20220111","caid":"c5f63bc7782c9c56f693c6676d9a9b96" }],caid1取值为779621032f9c06357f8f81fb09d181f2,caid2取值为c5f63bc7782c9c56f693c6676d9a9b96
def test_uccaid():
i = idfacode()
ip1 = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
clickios.parms['idfa'] = i
clickios.parms['ip'] = ip1
clickios.parms['caid'] = '%5B%7B%22version%22%3A%2220201230%22%2C%22caid%22%3A%22dab00f10e034e99cfe5d53985c3711122%22%7D%2C%7B%22version%22%3A%2220221230%22%2C%22caid%22%3A%22dab00f10e034e99wewcfe5d53985c37112%22%7D%5D'
clickios.send_requestandroid('')
print('点击')
# time.sleep(5)
# tkioreceive.data['context']['_deviceid'] = i
# tkioreceive.data['context']['_idfa'] = i
# tkioreceive.data['context']['_ip'] = ip1
# tkioreceive.data['context']['_caid1'] = '123456789012345'
# tkioreceive.data['context']['_caid2'] = '6789523654780214556'
# tkioreceive.data['context'][
# '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)'
# tkioreceive.send_request()
print(i)
# 点击存储
def test_at30():
mget = 'b21d0385ad8371de9e90b3e969a5d0c6:'
......
......@@ -34,8 +34,8 @@ parms = {
def send_requestandroid(hc):
url1 = 'http://52.80.137.106:8083/tkio/mYrAzqa?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/ZFFFVba?noredirect=true' + hc
url1 = 'http://52.80.137.106:8083/tkio/MfyEzya?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/26rQJza?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text)
print(url1)
......@@ -43,8 +43,8 @@ def send_requestandroid(hc):
def send_requestandroid2(hc):
url1 = 'http://52.80.137.106:8083/tkio/ZFFFVba?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/yyuyaea?noredirect=true' + hc
# url1 = 'http://52.80.137.106:8083/tkio/YnY7Rva?noredirect=true' + hc
url1 = 'http://uri6.com/tkio/6bMBNba?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text)
print(url1)
......
......@@ -32,8 +32,8 @@ parms = {
def send_requestandroid(hc):
url1 = 'http://52.80.137.106:8083/tkio/UvQbUra?noredirect=true' + hc
# url1 = 'http://uri6.com/tkio/rEFbiua?noredirect=true' + hc
# url1 = 'http://52.80.137.106:8083/tkio/F3QVrqa?noredirect=true' + hc
url1 = 'http://uri6.com/tkio/uUFN7fa?noredirect=true' + hc
response = requests.get(url=url1, params=parms, timeout=10, verify=False)
print(response.text)
print(url1)
......
......@@ -8,7 +8,7 @@ import hashlib
data = {
"what": "install",
"appid": "b34100cdf5b586774e5d4dd4357c7b17",
"appid": "5b0e99269160e67ef8e560716221e142",
"context": {
"_deviceid": "",
"_imei": "",
......@@ -62,9 +62,9 @@ def send_request():
def send_requestlogin():
global data
# 测试
url = "http://52.80.137.106:8080/receive/tkio/loggedin"
# url = "http://52.80.137.106:8080/receive/tkio/loggedin"
# 线上
# url = "http://log.trackingio.com/receive/tkio/loggedin"
url = "http://log.trackingio.com/receive/tkio/loggedin"
data['context']['install_time'] = int(round(time.time() * 1000))
print(data)
response = requests.request("POST", url, headers=headers, data=json.dumps(data))
......
......@@ -3,29 +3,114 @@ import socket
import struct
import random
import time
appkey = '30a90f0b0cfbde59b206bb046540a17f'
#cid
cid = '21029'
#surl
surl = 'uEBfIna'
import requests
appkey = '74131e54a444aa5a8597e73b646cba77'
# cid
cid = '21164'
# surl
surl = 'mAbeqaa'
# URL = 'http://52.80.137.106:8083/tkio/EjABBra?noredirect=true'
# URL = 'http://uri6.com/tkio/BVjQf2a?noredirect=true'
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 _ in range(1):
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(28))
# i = 'WEWRHWUEIEWRHEWR54HEWRUWEFCEWUFE'
# i = ''.join(str(random.choice(range(10))) for _ in range(28))
i = '2539452844786738942022514936'
# 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
#打开
allEvent().openxiaochengxu(i,ip,cid,surl,appkey)
# time.sleep(5)
# #pv
# allEvent().pviaochengxu(i,ip,cid,surl,appkey)
# # #离开
# # allEvent().hidechengxu(i,ip,cid,surl,appkey)
# allEvent().regedchengxu(i,ip,cid,surl,appkey)
# # time.sleep(2)
# # allEvent().loggedinchengxu(i,ip,cid,surl,appkey)
# # time.sleep(2)
# allEvent().paymentchengxu(i,ip,cid,surl,appkey)
# # 打开
# allEvent().openxiaochengxu(i, ip, cid, surl, appkey, impressionid, requestid)
# # # time.sleep(5)
# # # #pv
# # # allEvent().pviaochengxu(i,ip,cid,surl,appkey)
# # # # # #离开
# # # # allEvent().hidechengxu(i,ip,cid,surl,appkey)
# # # time.sleep(2)
allEvent().regedchengxu(i, ip, cid, surl, appkey)
# # # time.sleep(2)
# allEvent().loggedinchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().paymentchengxu(i,ip,cid,surl,appkey)
# time.sleep(2)
# allEvent().eventchengxu(i,ip,cid,surl,appkey)
# for index in range(1):
# i = ''.join(str(random.choice(range(10))) for _ in range(28))
# # i = '1761453021140876860117396099'
#
#
# # print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# # 随机生成12为数组
# # impressionid = ''.join(str(random.choice(range(10))) for _ in range(12))
# impressionid = '111222334455'
# # requestid = ''.join(str(random.choice(range(10))) for _ in range(12))
# requestid = '1112223344'
# accountid = ''.join(str(random.choice(range(10))) for _ in range(12))
# # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# # ip = '156.119.456.190'
# try:
# parms = {
# 'click_time': str(round(time.time() * 1000)),
# # 'click_time': '1663309200',
# 'accountid': accountid,
# 'ip': ip,
# 'impression_id': impressionid,
# 'request_id': requestid,
# '_ry_adgroup_id': '333',
# '_ry_adplan_id': "333",
# '_ry_adcreative_id': '333'
# }
# # timeout可以超时四秒
# # verify = False
# p = requests.get(url=URL, params=parms, timeout=10, verify=False)
# print('imei:', i)
#
# print("ip:", ip)
# # print("accountid:", accountid)
# print(p.text)
# print(p.url)
# # print("oaid:",o)
# print('success:', s)
# print(p.status_code)
# print(p.content)
# # print('androidid:',a)
# # print(nowTime)
# s = s + 1
# except Exception as err:
# print(err)
# print('wrong:', w)
# print('imei:', i)
# print("ip:", ip)
# # print(p.status_code)
# # print('androidid', a)
# w = w + 1
#
# time.sleep(6)
# try:
# allEvent().openxiaochengxu(i, ip, cid, surl, appkey, impressionid, requestid)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# # pv
# time.sleep(2)
# allEvent().pviaochengxu(i, ip, cid, surl, appkey)
# # #离开
# time.sleep(2)
# allEvent().hidechengxu(i,ip,cid,surl,appkey)
# time.sleep(200)
# allEvent().regedchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().loggedinchengxu(i,ip,cid,surl,appkey)
# time.sleep(2)
# allEvent().paymentchengxu(i, ip, cid, surl, appkey)
# time.sleep(2)
# allEvent().eventchengxu(i, ip, cid, surl, appkey)
......@@ -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'
# 时间和日期
......@@ -33,7 +33,7 @@ isreyundefaultevent = ''
class allEvent:
# 打开小程序
def openxiaochengxu(self, i, IP, cid, surl, appid):
def openxiaochengxu(self, i, IP, cid, surl, appid, impressionid, requestid):
s = json.dumps({
"what": "launch",
"appid": appid,
......@@ -43,17 +43,22 @@ class allEvent:
"_deviceid": i,
"_openid": i,
"_campaignid": surl,
"_sceneid": "unknown",
"_ry_adgroup_id": "111",
"_ry_adplan_id": "111",
"_ry_adcreative_id": "111",
# "advertiser_id": "aaa",
# "ad_id": "aaa",
# "creative_id": "aaa",
"_sceneid": "434444",
"gdt_vid": '1112223344',
# "ry_adgroup_id": "111",
# "ry_adplan_id": "111",
# "ry_adcreative_id": "111",
# "accountid":"123456",
'impression_id': impressionid,
'request_id': requestid,
# 投放广告详情-头条
"advertiser_id": "ccc",
"ad_id": "ccc",
"creative_id": "ccc",
"_apptype": "wx"
},
"where": "launch",
"when": when,
# "when": when,
"ds": ds,
"who": "lxx-test"
})
......@@ -134,8 +139,10 @@ class allEvent:
print(p.text)
# 付费
def paymentchengxu(self, i, IP, cid, surl, appid):
transactionid = ''.join(str(random.choice(range(10))) for _ in range(19))
# transactionid = '6630524942642751767'
s = json.dumps({
"what": "payment",
"appid": appid,
......@@ -151,7 +158,7 @@ class allEvent:
'_transactionid': transactionid,
'_paymenttype': paymenttype,
'_currencyamount': '90',
"_currencytype":currencytype,
"_currencytype": currencytype,
"_duration": "10"
},
"where": "payment",
......@@ -162,8 +169,7 @@ class allEvent:
p = requests.post(url=URL, data=s, headers=headers, timeout=5)
print(p.text)
# loggedin
# loggedin
def loggedinchengxu(self, i, IP, cid, surl, appid):
s = json.dumps({
"what": "loggedin",
......@@ -177,6 +183,10 @@ class allEvent:
"_sceneid": "unknown",
"_apptype": "wx",
"_num_pages": "5",
"ry_adgroup_id": "111",
"_y_adplan_id": "111",
"ry_adcreative_id": "111",
"accountid": "123456",
"_duration": "10"
},
"where": "loggedin",
......@@ -187,8 +197,7 @@ class allEvent:
p = requests.post(url=URL, data=s, headers=headers, timeout=5)
print(p.text)
# 自定义事件
# 自定义事件
def eventchengxu(self, i, IP, cid, surl, appid):
s = json.dumps({
"what": "event_10",
......@@ -211,4 +220,4 @@ class allEvent:
"who": "lxx-test"
})
p = requests.post(url=URL, data=s, headers=headers, timeout=5)
print(p.text)
\ No newline at end of file
print(p.text)
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