1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: envcfg.py
@time: 2020/8/6 17:34
@desc:
"""
from common.iniUtil import read_config
import jenkins
'''server = jenkins.Jenkins('http://127.0.0.1:8080', username='admin', password='reyun.com')
server.build_job('tkio_interface_test')
print(server.get_job_info('tkio_interface_test'))'''
# 生产环境:
path = "/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/config/setting/config.ini"
rc = read_config(path)
url = rc.get("env", "click_url")
print(url)
# click_url = 'http://10.3.20.42:8083/tkio/JjuUb2a'
click_url = 'http://10.3.20.42:8083/tkio/Bzq2aua'
# prod_event_url = 'http://log.trackingio.com'
prod_event_url = 'http://log.reyun.com'
# prod_event_url = 'http://10.3.20.42:8080'
# test_event_url = 'http://10.3.20.42:8080'
prod_appkey = "426fb8e0d9879ebe739cc2a48585bf14"
# prod_appkey = "57ed2dd31596bb4682471e82c0c73c1a"
event_interface = dict(install='/receive/tkio/install', loggedin='/receive/tkio/loggedin',
pageduration='/receive/tkio/pageduration', payment='/receive/tkio/payment',
order='/receive/tkio/order', register='/receive/tkio/register',
startup='/receive/tkio/startup', event='/receive/tkio/event',
appduration='/receive/tkio/appduration', adshow='/receive/tkio/adshow', adclick='/receive/tkio/adclick')
prod = {
"click": ["http://t.uri6.com/tkio/EFbIzya?noredirect=true", "895c5256a7f47bd2cca88a29da9e978a"],
"events": {
"url": "http://log.trackingio.com/receive/tkio/",
# "url": "http://10.3.20.42:8080",
"interface": "/receive/tkiov2/install",
"appkey": "b58f29d64718c6723895cb8a2389258c",
"adclick": "adclick"
},
}
headers = {'Content-Type': 'application/json'}
'''prod_params = {
'androidid': "43214532142142",
'imei': randomUtil.r.randimei(),
"idfa": 'DBC13622-E34B-440C-B7A7-FB6641D0D9AB',
'ip': randomUtil.r.randip(),
"ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko)Version/5.1 "
"Mobile/9A334 Safari/7534.48.3", 'creativeId': '21321321312123', 'requestId': '312321321312',
"adId": long('21231'),
"ry_adgroup_name": "头条广告组2",
"ry_adplan_name": "头条广告计划2",
"ry_adcreative_name": "头条广告名称2",
"ry_adgroup_id": 999,
"ry_adplan_id": 999,
"ry_adcreative_id": 999,
"appduration": 10,
"pageduration": 1000,
"istablet": "istablet",
"lib": "IOS",
"when1": "'2020-06-06 16:44:31'",
"model": "测试1",
"ryosversion": "10.0.0",
"network_type": "5G",
"carrier": "中国联通",
"lv": "1.5.0",
"cmpaignid": 3333,
"current_time_13": int(round(time.time() * 1000)),
"when": time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
"ds": time.strftime('%Y-%m-%d', time.localtime(time.time())),
"manufacturer": "VIVO",
"ryos": "android",
"rydevicetype": "vivox9",
"network": "wifi",
"resolution": "1344*750",
"op": "中国移动",
# 支付类型 支付宝(alipay),银联(unionpay),微信支付(weixinpay),易宝支付(yeepay)
"paymenttype": "alipay",
"currencytype": "CNY",
"currencyamount": 10,
"adid": 839296815,
# 填充广告的变现平台,例如穿山甲(csj)、优量汇(ylh)、百青藤(bqt)、Sigmob(sigmob)、快手(ks)、Mintegral(mintegral)、OneWay(oneway)、Vungle(vungle)等
"adPlatform": "mintegral"
}'''