lazyad 0.0.67__py3-none-any.whl → 0.0.69__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lazyad might be problematic. Click here for more details.
- lazyad/crawlers/chuangliang.py +154 -2
- lazyad/crawlers/mintegral.py +11 -5
- {lazyad-0.0.67.dist-info → lazyad-0.0.69.dist-info}/METADATA +1 -1
- {lazyad-0.0.67.dist-info → lazyad-0.0.69.dist-info}/RECORD +6 -6
- {lazyad-0.0.67.dist-info → lazyad-0.0.69.dist-info}/WHEEL +0 -0
- {lazyad-0.0.67.dist-info → lazyad-0.0.69.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -227,6 +227,7 @@ def get_plan_list(
|
|
|
227
227
|
kpis: list = None,
|
|
228
228
|
req_source: str = None,
|
|
229
229
|
host: str = default_host,
|
|
230
|
+
base_infos: list = None
|
|
230
231
|
):
|
|
231
232
|
"""
|
|
232
233
|
获取推广计划
|
|
@@ -256,6 +257,23 @@ def get_plan_list(
|
|
|
256
257
|
cdt_start_date = lazytime.get_date_string(days=-365)
|
|
257
258
|
if not cdt_end_date:
|
|
258
259
|
cdt_end_date = lazytime.get_date_string(days=0)
|
|
260
|
+
if not base_infos:
|
|
261
|
+
base_infos = [
|
|
262
|
+
"adgroup_name",
|
|
263
|
+
"adgroup_id",
|
|
264
|
+
"advertiser_id",
|
|
265
|
+
"company",
|
|
266
|
+
"optimization_goal",
|
|
267
|
+
"system_status",
|
|
268
|
+
"bid_amount",
|
|
269
|
+
"deep_conversion_worth_roi",
|
|
270
|
+
"created_time",
|
|
271
|
+
"user_name",
|
|
272
|
+
"daily_budget",
|
|
273
|
+
"bid_mode",
|
|
274
|
+
"deep_conversion_spec",
|
|
275
|
+
"begin_date"
|
|
276
|
+
]
|
|
259
277
|
data = {
|
|
260
278
|
"start_date": start_date,
|
|
261
279
|
"end_date": end_date,
|
|
@@ -263,7 +281,8 @@ def get_plan_list(
|
|
|
263
281
|
"page_size": page_size,
|
|
264
282
|
"sort_field": sort_field,
|
|
265
283
|
"sort_direction": sort_direction,
|
|
266
|
-
"data_type": data_type
|
|
284
|
+
"data_type": data_type,
|
|
285
|
+
"base_infos": base_infos
|
|
267
286
|
}
|
|
268
287
|
if media_type == "baidu":
|
|
269
288
|
url = f"https://{host}/Baidu/Campaign/getList"
|
|
@@ -282,7 +301,7 @@ def get_plan_list(
|
|
|
282
301
|
if media_account_id:
|
|
283
302
|
conditions["media_account_id"] = [media_account_id]
|
|
284
303
|
data["conditions"] = json.dumps(conditions)
|
|
285
|
-
elif media_type
|
|
304
|
+
elif media_type in ["gdt_new"]:
|
|
286
305
|
url = f"https://{host}/Gdt/MainList/getList"
|
|
287
306
|
if not conditions:
|
|
288
307
|
conditions = {
|
|
@@ -994,3 +1013,136 @@ def get_toutiao_promotion(
|
|
|
994
1013
|
json=data,
|
|
995
1014
|
headers=headers
|
|
996
1015
|
)
|
|
1016
|
+
|
|
1017
|
+
|
|
1018
|
+
def MainPanelReport_AdReport_getReport(
|
|
1019
|
+
cookie: str,
|
|
1020
|
+
media_type: str,
|
|
1021
|
+
sort_field: str,
|
|
1022
|
+
media_account_id: int = None,
|
|
1023
|
+
page: int = 1,
|
|
1024
|
+
page_size: int = 20,
|
|
1025
|
+
start_date: str = None,
|
|
1026
|
+
end_date: str = None,
|
|
1027
|
+
sort_direction: str = "desc",
|
|
1028
|
+
data_type: str = "list",
|
|
1029
|
+
conditions: dict = None,
|
|
1030
|
+
cdt_start_date: str = None,
|
|
1031
|
+
cdt_end_date: str = None,
|
|
1032
|
+
kpis: list = None,
|
|
1033
|
+
req_source: str = None,
|
|
1034
|
+
|
|
1035
|
+
base_infos: list = None,
|
|
1036
|
+
search_field: str = None,
|
|
1037
|
+
search_keyword: str = None,
|
|
1038
|
+
time_line: str = "REPORTING_TIME",
|
|
1039
|
+
|
|
1040
|
+
scheme: str = "https",
|
|
1041
|
+
host: str = default_host,
|
|
1042
|
+
filename: str = "/MainPanelReport/AdReport/getReport"
|
|
1043
|
+
):
|
|
1044
|
+
"""
|
|
1045
|
+
推广-广告管理-广告
|
|
1046
|
+
:param cookie:
|
|
1047
|
+
:param media_type:
|
|
1048
|
+
:param media_account_id:
|
|
1049
|
+
:param sort_field: 排序字段
|
|
1050
|
+
:param page:
|
|
1051
|
+
:param page_size:
|
|
1052
|
+
:param start_date: 数据开始日期
|
|
1053
|
+
:param end_date: 数据结束日期
|
|
1054
|
+
:param sort_direction: 排序方式,desc:降序
|
|
1055
|
+
:param data_type:
|
|
1056
|
+
:param conditions: 搜索条件
|
|
1057
|
+
:param advertiser_id: 账户id
|
|
1058
|
+
:param cdt_start_date: 创建开始时间
|
|
1059
|
+
:param cdt_end_date: 创建结束时间
|
|
1060
|
+
:param kpis:
|
|
1061
|
+
:param req_source: 腾讯需要的参数
|
|
1062
|
+
:return:
|
|
1063
|
+
"""
|
|
1064
|
+
url = f"{scheme}://{host}{filename}"
|
|
1065
|
+
if not start_date:
|
|
1066
|
+
start_date = lazytime.get_date_string(days=0)
|
|
1067
|
+
if not end_date:
|
|
1068
|
+
end_date = lazytime.get_date_string(days=0)
|
|
1069
|
+
if not cdt_start_date:
|
|
1070
|
+
cdt_start_date = lazytime.get_date_string(days=-365)
|
|
1071
|
+
if not cdt_end_date:
|
|
1072
|
+
cdt_end_date = lazytime.get_date_string(days=0)
|
|
1073
|
+
if not base_infos:
|
|
1074
|
+
base_infos = [
|
|
1075
|
+
"adgroup_name",
|
|
1076
|
+
"adgroup_id",
|
|
1077
|
+
"advertiser_id",
|
|
1078
|
+
"company",
|
|
1079
|
+
"optimization_goal",
|
|
1080
|
+
"system_status",
|
|
1081
|
+
"bid_amount",
|
|
1082
|
+
"deep_conversion_worth_roi",
|
|
1083
|
+
"created_time",
|
|
1084
|
+
"user_name",
|
|
1085
|
+
"daily_budget",
|
|
1086
|
+
"bid_mode",
|
|
1087
|
+
"deep_conversion_spec",
|
|
1088
|
+
"begin_date"
|
|
1089
|
+
]
|
|
1090
|
+
data = {
|
|
1091
|
+
"start_date": start_date,
|
|
1092
|
+
"end_date": end_date,
|
|
1093
|
+
"page": page,
|
|
1094
|
+
"page_size": page_size,
|
|
1095
|
+
"sort_field": sort_field,
|
|
1096
|
+
"sort_direction": sort_direction,
|
|
1097
|
+
"data_type": data_type,
|
|
1098
|
+
"base_infos": base_infos,
|
|
1099
|
+
"time_line": time_line
|
|
1100
|
+
}
|
|
1101
|
+
if media_type == "baidu":
|
|
1102
|
+
if not conditions:
|
|
1103
|
+
conditions = {
|
|
1104
|
+
"cl_project_id": [],
|
|
1105
|
+
"optimize_user_id": [],
|
|
1106
|
+
"media_account_id": [],
|
|
1107
|
+
"extension_subject": [],
|
|
1108
|
+
"status": "",
|
|
1109
|
+
"keyword": "",
|
|
1110
|
+
"companys": [],
|
|
1111
|
+
"cdt_start_date": f"{cdt_start_date} 00:00:00",
|
|
1112
|
+
"cdt_end_date": f"{cdt_end_date} 23:59:59"
|
|
1113
|
+
}
|
|
1114
|
+
if media_account_id:
|
|
1115
|
+
conditions["media_account_id"] = [media_account_id]
|
|
1116
|
+
data["conditions"] = json.dumps(conditions)
|
|
1117
|
+
elif media_type in ["gdt_new", "gdt_upgrade"]:
|
|
1118
|
+
if not conditions:
|
|
1119
|
+
conditions = {
|
|
1120
|
+
"is_deleted": "",
|
|
1121
|
+
"auto_acquisition_status": [],
|
|
1122
|
+
"combinatorial_id": [],
|
|
1123
|
+
"companys": [],
|
|
1124
|
+
"configured_status": ["STATUS_NO_DELETED"], # 所有未删除
|
|
1125
|
+
"created_time": [cdt_start_date, cdt_end_date],
|
|
1126
|
+
"last_modified_time": [],
|
|
1127
|
+
"media_project_id": [],
|
|
1128
|
+
"owner_user_id": [],
|
|
1129
|
+
"search_field": search_field,
|
|
1130
|
+
"search_keyword": search_keyword,
|
|
1131
|
+
"system_status": [],
|
|
1132
|
+
"time_line": time_line,
|
|
1133
|
+
}
|
|
1134
|
+
data["conditions"] = json.dumps(conditions)
|
|
1135
|
+
if kpis:
|
|
1136
|
+
data["kpis"] = kpis
|
|
1137
|
+
if req_source:
|
|
1138
|
+
data["req_source"] = req_source
|
|
1139
|
+
else:
|
|
1140
|
+
return
|
|
1141
|
+
headers = copy.deepcopy(default_headers)
|
|
1142
|
+
headers["Cookie"] = cookie
|
|
1143
|
+
return lazyrequests.lazy_requests(
|
|
1144
|
+
method="POST",
|
|
1145
|
+
url=url,
|
|
1146
|
+
json=data,
|
|
1147
|
+
headers=headers
|
|
1148
|
+
)
|
lazyad/crawlers/mintegral.py
CHANGED
|
@@ -325,19 +325,25 @@ def history(
|
|
|
325
325
|
cookie: str,
|
|
326
326
|
page: int = 1,
|
|
327
327
|
page_size: int = 50,
|
|
328
|
-
|
|
329
|
-
start_time: str = None,
|
|
330
|
-
end_time: str = None,
|
|
331
|
-
objective_type: str = "adv_offer",
|
|
328
|
+
objective_type: str = "",
|
|
332
329
|
objective: list = None,
|
|
333
330
|
operator: list = None,
|
|
334
331
|
operation: list = None,
|
|
335
|
-
feature: list = None
|
|
332
|
+
feature: list = None,
|
|
333
|
+
|
|
334
|
+
start_time: str = None,
|
|
335
|
+
end_time: str = None,
|
|
336
|
+
timezone: int = 8,
|
|
336
337
|
):
|
|
337
338
|
"""
|
|
338
339
|
获取 操作日志
|
|
340
|
+
注意:开始时间和结束时间如果为相同时间则无法获取数据
|
|
339
341
|
需要登录:{'code': 400, 'msg': 'Please login first', 'data': None}
|
|
340
342
|
验证成功:{'code': 200, 'msg': 'success', 'data': {}
|
|
343
|
+
:param timezone: 时区,默认:UTC+8:8
|
|
344
|
+
:param start_time: 开始时间,默认:days=-7,例如:2025-08-05 00:00:00
|
|
345
|
+
:param end_time: 结束时间,默认:days=1,例如:2025-08-05 00:00:00
|
|
346
|
+
:param objective_type: 查询类型,全部:"",广告:adv_campaign,广告单元:adv_offer
|
|
341
347
|
"""
|
|
342
348
|
scheme = "https"
|
|
343
349
|
host = "ss-api.mintegral.com"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
lazyad/__init__.py,sha256=tnVTFEgdzgMWQI0mZqy3DAueMJjpypPb15DdxJ-9TiU,41
|
|
2
2
|
lazyad/crawlers/__init__.py,sha256=GK3GGpiUJbESc1uGTwSmEnsSUwYDNZfJCxeLYB4CpS4,68
|
|
3
|
-
lazyad/crawlers/chuangliang.py,sha256=
|
|
4
|
-
lazyad/crawlers/mintegral.py,sha256=
|
|
3
|
+
lazyad/crawlers/chuangliang.py,sha256=EyES5S0Z5THbqYboDzR6np0BC36Zkwn5CsU8_K2HbNI,33293
|
|
4
|
+
lazyad/crawlers/mintegral.py,sha256=Fij7FtcNGMOahCjf97r0zu4sRefzk0ELnSmk62gl7_U,11551
|
|
5
5
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
6
6
|
lazyad/crawlers/qq.py,sha256=X_VjdgzAcDfckEAHrvdqBLtnmAuCBHPJVWu2H-IHZBA,5649
|
|
7
7
|
lazyad/crawlers/wshoto.py,sha256=3xckDjK-BpEGPMLHUBgQ8OWuUq77EBL9f7d4j0jwuAY,1224
|
|
@@ -10,7 +10,7 @@ lazyad/open/kuaishou.py,sha256=B4wz3XW1hLQy7XR_nDQwrMUrYnm9Djec7OXKXRdiYXc,635
|
|
|
10
10
|
lazyad/open/mintegral.py,sha256=BXCaCfnz2iUsR-RtDSA8I27KSK8r4v3xkZfllD9q_vY,12788
|
|
11
11
|
lazyad/open/qq.py,sha256=pru1p4LCjURD9N5ukx-OStYAmDCvrTW4VMB2N0-3i5Q,6904
|
|
12
12
|
lazyad/open/unity.py,sha256=A0tEN5k40xq0v1cRnTLwRN5N7CBIe2oAyMRH1uxDAEw,8493
|
|
13
|
-
lazyad-0.0.
|
|
14
|
-
lazyad-0.0.
|
|
15
|
-
lazyad-0.0.
|
|
16
|
-
lazyad-0.0.
|
|
13
|
+
lazyad-0.0.69.dist-info/METADATA,sha256=EhIicrFHrMTR5IA-g-yBBfbvRj2Cq-Es2bmo428zrCQ,1916
|
|
14
|
+
lazyad-0.0.69.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
15
|
+
lazyad-0.0.69.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
16
|
+
lazyad-0.0.69.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|