lazyad 0.0.72__py3-none-any.whl → 0.0.74__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 +186 -35
- {lazyad-0.0.72.dist-info → lazyad-0.0.74.dist-info}/METADATA +1 -1
- {lazyad-0.0.72.dist-info → lazyad-0.0.74.dist-info}/RECORD +5 -5
- {lazyad-0.0.72.dist-info → lazyad-0.0.74.dist-info}/WHEEL +0 -0
- {lazyad-0.0.72.dist-info → lazyad-0.0.74.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -362,6 +362,7 @@ def update_ad_batch(
|
|
|
362
362
|
):
|
|
363
363
|
"""
|
|
364
364
|
暂停广告
|
|
365
|
+
: param operate: 操作:暂停:DISABLE,删除:DELETE
|
|
365
366
|
:return:
|
|
366
367
|
"""
|
|
367
368
|
headers = copy.deepcopy(default_headers)
|
|
@@ -604,7 +605,8 @@ def get_account_report(
|
|
|
604
605
|
conditions: dict = None,
|
|
605
606
|
kpis: list = None,
|
|
606
607
|
base_infos: list = None,
|
|
607
|
-
time_line: str = "REPORTING_TIME"
|
|
608
|
+
time_line: str = "REPORTING_TIME",
|
|
609
|
+
host: str = "cli2.mobgi.com",
|
|
608
610
|
):
|
|
609
611
|
"""
|
|
610
612
|
推广-广告管理-媒体账户
|
|
@@ -625,7 +627,7 @@ def get_account_report(
|
|
|
625
627
|
start_date = lazytime.get_date_string(days=0)
|
|
626
628
|
if not end_date:
|
|
627
629
|
end_date = lazytime.get_date_string(days=0)
|
|
628
|
-
url = "https://
|
|
630
|
+
url = f"https://{host}/MainPanelReport/AccountReport/getReport"
|
|
629
631
|
data = {
|
|
630
632
|
"data_type": data_type,
|
|
631
633
|
"media_type": media_type,
|
|
@@ -1035,7 +1037,7 @@ def MainPanelReport_AdReport_getReport(
|
|
|
1035
1037
|
base_infos: list = None,
|
|
1036
1038
|
search_field: str = None,
|
|
1037
1039
|
search_keyword: str = None,
|
|
1038
|
-
time_line: str =
|
|
1040
|
+
time_line: str = None,
|
|
1039
1041
|
|
|
1040
1042
|
scheme: str = "https",
|
|
1041
1043
|
host: str = default_host,
|
|
@@ -1054,7 +1056,6 @@ def MainPanelReport_AdReport_getReport(
|
|
|
1054
1056
|
:param sort_direction: 排序方式,desc:降序
|
|
1055
1057
|
:param data_type:
|
|
1056
1058
|
:param conditions: 搜索条件
|
|
1057
|
-
:param advertiser_id: 账户id
|
|
1058
1059
|
:param cdt_start_date: 创建开始时间
|
|
1059
1060
|
:param cdt_end_date: 创建结束时间
|
|
1060
1061
|
:param kpis:
|
|
@@ -1072,32 +1073,52 @@ def MainPanelReport_AdReport_getReport(
|
|
|
1072
1073
|
cdt_end_date = lazytime.get_date_string(days=0)
|
|
1073
1074
|
if not base_infos:
|
|
1074
1075
|
base_infos = [
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
"
|
|
1096
|
-
|
|
1097
|
-
"
|
|
1098
|
-
|
|
1099
|
-
"
|
|
1100
|
-
|
|
1076
|
+
"adgroup_name",
|
|
1077
|
+
"adgroup_id",
|
|
1078
|
+
"advertiser_id",
|
|
1079
|
+
"company",
|
|
1080
|
+
"optimization_goal",
|
|
1081
|
+
"system_status",
|
|
1082
|
+
"bid_amount",
|
|
1083
|
+
"deep_conversion_worth_roi",
|
|
1084
|
+
"created_time",
|
|
1085
|
+
"user_name",
|
|
1086
|
+
"daily_budget",
|
|
1087
|
+
"bid_mode",
|
|
1088
|
+
"deep_conversion_spec",
|
|
1089
|
+
"begin_date"
|
|
1090
|
+
]
|
|
1091
|
+
|
|
1092
|
+
data = dict()
|
|
1093
|
+
|
|
1094
|
+
# 默认参数
|
|
1095
|
+
if base_infos:
|
|
1096
|
+
data["base_infos"] = base_infos
|
|
1097
|
+
if conditions:
|
|
1098
|
+
data["conditions"] = conditions
|
|
1099
|
+
if data_type:
|
|
1100
|
+
data["data_type"] = data_type
|
|
1101
|
+
if end_date:
|
|
1102
|
+
data["end_date"] = end_date
|
|
1103
|
+
if kpis:
|
|
1104
|
+
data["kpis"] = kpis
|
|
1105
|
+
if media_type:
|
|
1106
|
+
data["media_type"] = media_type
|
|
1107
|
+
if page:
|
|
1108
|
+
data["page"] = page
|
|
1109
|
+
if page_size:
|
|
1110
|
+
data["page_size"] = page_size
|
|
1111
|
+
if sort_direction:
|
|
1112
|
+
data["sort_direction"] = sort_direction
|
|
1113
|
+
if sort_field:
|
|
1114
|
+
data["sort_field"] = sort_field
|
|
1115
|
+
if start_date:
|
|
1116
|
+
data["start_date"] = start_date
|
|
1117
|
+
if time_line:
|
|
1118
|
+
data["time_line"] = time_line
|
|
1119
|
+
if req_source:
|
|
1120
|
+
data["req_source"] = req_source
|
|
1121
|
+
|
|
1101
1122
|
if media_type == "baidu":
|
|
1102
1123
|
if not conditions:
|
|
1103
1124
|
conditions = {
|
|
@@ -1114,7 +1135,10 @@ def MainPanelReport_AdReport_getReport(
|
|
|
1114
1135
|
if media_account_id:
|
|
1115
1136
|
conditions["media_account_id"] = [media_account_id]
|
|
1116
1137
|
data["conditions"] = json.dumps(conditions)
|
|
1138
|
+
|
|
1117
1139
|
elif media_type in ["gdt_new", "gdt_upgrade"]:
|
|
1140
|
+
if not time_line:
|
|
1141
|
+
time_line = "REPORTING_TIME"
|
|
1118
1142
|
if not conditions:
|
|
1119
1143
|
conditions = {
|
|
1120
1144
|
"is_deleted": "",
|
|
@@ -1132,12 +1156,139 @@ def MainPanelReport_AdReport_getReport(
|
|
|
1132
1156
|
"time_line": time_line,
|
|
1133
1157
|
}
|
|
1134
1158
|
data["conditions"] = json.dumps(conditions)
|
|
1135
|
-
if
|
|
1136
|
-
data["
|
|
1137
|
-
if req_source:
|
|
1138
|
-
data["req_source"] = req_source
|
|
1159
|
+
if time_line:
|
|
1160
|
+
data["time_line"] = time_line
|
|
1139
1161
|
else:
|
|
1140
|
-
|
|
1162
|
+
pass
|
|
1163
|
+
headers = copy.deepcopy(default_headers)
|
|
1164
|
+
headers["Cookie"] = cookie
|
|
1165
|
+
return lazyrequests.lazy_requests(
|
|
1166
|
+
method="POST",
|
|
1167
|
+
url=url,
|
|
1168
|
+
json=data,
|
|
1169
|
+
headers=headers
|
|
1170
|
+
)
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
def MainPanelReport_AccountReport_getReport(
|
|
1174
|
+
cookie: str,
|
|
1175
|
+
media_type: str,
|
|
1176
|
+
sort_field: str,
|
|
1177
|
+
media_account_id: int = None,
|
|
1178
|
+
page: int = 1,
|
|
1179
|
+
page_size: int = 20,
|
|
1180
|
+
start_date: str = None,
|
|
1181
|
+
end_date: str = None,
|
|
1182
|
+
sort_direction: str = "desc",
|
|
1183
|
+
data_type: str = "list",
|
|
1184
|
+
conditions: dict = None,
|
|
1185
|
+
cdt_start_date: str = None,
|
|
1186
|
+
cdt_end_date: str = None,
|
|
1187
|
+
kpis: list = None,
|
|
1188
|
+
req_source: str = None,
|
|
1189
|
+
|
|
1190
|
+
base_infos: list = None,
|
|
1191
|
+
search_field: str = None,
|
|
1192
|
+
search_keyword: str = None,
|
|
1193
|
+
time_line: str = None,
|
|
1194
|
+
|
|
1195
|
+
scheme: str = "https",
|
|
1196
|
+
host: str = default_host,
|
|
1197
|
+
filename: str = "/MainPanelReport/AccountReport/getReport"
|
|
1198
|
+
):
|
|
1199
|
+
"""
|
|
1200
|
+
推广-广告管理-账户
|
|
1201
|
+
:param cookie:
|
|
1202
|
+
:param media_type:
|
|
1203
|
+
:param media_account_id:
|
|
1204
|
+
:param sort_field: 排序字段
|
|
1205
|
+
:param page:
|
|
1206
|
+
:param page_size:
|
|
1207
|
+
:param start_date: 数据开始日期
|
|
1208
|
+
:param end_date: 数据结束日期
|
|
1209
|
+
:param sort_direction: 排序方式,desc:降序
|
|
1210
|
+
:param data_type:
|
|
1211
|
+
:param conditions: 搜索条件
|
|
1212
|
+
:param cdt_start_date: 创建开始时间
|
|
1213
|
+
:param cdt_end_date: 创建结束时间
|
|
1214
|
+
:param kpis:
|
|
1215
|
+
:param req_source: 腾讯需要的参数
|
|
1216
|
+
:return:
|
|
1217
|
+
"""
|
|
1218
|
+
url = f"{scheme}://{host}{filename}"
|
|
1219
|
+
data = dict()
|
|
1220
|
+
|
|
1221
|
+
# 默认参数
|
|
1222
|
+
if base_infos:
|
|
1223
|
+
data["base_infos"] = base_infos
|
|
1224
|
+
if conditions:
|
|
1225
|
+
data["conditions"] = conditions
|
|
1226
|
+
if data_type:
|
|
1227
|
+
data["data_type"] = data_type
|
|
1228
|
+
if end_date:
|
|
1229
|
+
data["end_date"] = end_date
|
|
1230
|
+
if kpis:
|
|
1231
|
+
data["kpis"] = kpis
|
|
1232
|
+
if media_type:
|
|
1233
|
+
data["media_type"] = media_type
|
|
1234
|
+
if page:
|
|
1235
|
+
data["page"] = page
|
|
1236
|
+
if page_size:
|
|
1237
|
+
data["page_size"] = page_size
|
|
1238
|
+
if sort_direction:
|
|
1239
|
+
data["sort_direction"] = sort_direction
|
|
1240
|
+
if sort_field:
|
|
1241
|
+
data["sort_field"] = sort_field
|
|
1242
|
+
if start_date:
|
|
1243
|
+
data["start_date"] = start_date
|
|
1244
|
+
if time_line:
|
|
1245
|
+
data["time_line"] = time_line
|
|
1246
|
+
if req_source:
|
|
1247
|
+
data["req_source"] = req_source
|
|
1248
|
+
|
|
1249
|
+
headers = copy.deepcopy(default_headers)
|
|
1250
|
+
headers["Cookie"] = cookie
|
|
1251
|
+
return lazyrequests.lazy_requests(
|
|
1252
|
+
method="POST",
|
|
1253
|
+
url=url,
|
|
1254
|
+
json=data,
|
|
1255
|
+
headers=headers
|
|
1256
|
+
)
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
def Advertiser_getRealAdvertiserData(
|
|
1260
|
+
cookie: str,
|
|
1261
|
+
start_date: str = None,
|
|
1262
|
+
end_date: str = None,
|
|
1263
|
+
media_account_ids: list = None,
|
|
1264
|
+
conditions: str = None,
|
|
1265
|
+
scheme: str = "https",
|
|
1266
|
+
host: str = default_host,
|
|
1267
|
+
filename: str = "/Toutiao/Advertiser/getRealAdvertiserData"
|
|
1268
|
+
):
|
|
1269
|
+
"""
|
|
1270
|
+
推广-广告管理-广告 获取最新的广告数据
|
|
1271
|
+
:param cookie:
|
|
1272
|
+
:param start_date: 数据开始日期
|
|
1273
|
+
:param end_date: 数据结束日期
|
|
1274
|
+
:return:
|
|
1275
|
+
"""
|
|
1276
|
+
url = f"{scheme}://{host}{filename}"
|
|
1277
|
+
if not start_date:
|
|
1278
|
+
start_date = lazytime.get_date_string(days=0)
|
|
1279
|
+
if not end_date:
|
|
1280
|
+
end_date = lazytime.get_date_string(days=0)
|
|
1281
|
+
|
|
1282
|
+
if not conditions and media_account_ids:
|
|
1283
|
+
conditions_list = list()
|
|
1284
|
+
for each_media_account_id in media_account_ids:
|
|
1285
|
+
conditions_list.append({"media_account_id": str(each_media_account_id)})
|
|
1286
|
+
conditions = json.dumps(conditions_list)
|
|
1287
|
+
data = {
|
|
1288
|
+
"conditions": conditions,
|
|
1289
|
+
"start_date": start_date,
|
|
1290
|
+
"end_date": end_date
|
|
1291
|
+
}
|
|
1141
1292
|
headers = copy.deepcopy(default_headers)
|
|
1142
1293
|
headers["Cookie"] = cookie
|
|
1143
1294
|
return lazyrequests.lazy_requests(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
lazyad/__init__.py,sha256=tnVTFEgdzgMWQI0mZqy3DAueMJjpypPb15DdxJ-9TiU,41
|
|
2
2
|
lazyad/crawlers/__init__.py,sha256=GK3GGpiUJbESc1uGTwSmEnsSUwYDNZfJCxeLYB4CpS4,68
|
|
3
|
-
lazyad/crawlers/chuangliang.py,sha256=
|
|
3
|
+
lazyad/crawlers/chuangliang.py,sha256=wDMe8OPJKMgSfkOu2rSWzreWLl3eusiFbq-oYCamUPo,37513
|
|
4
4
|
lazyad/crawlers/mintegral.py,sha256=paibUE4R_sClQbGVVeRK9T5TzGqq6iDfWwDowWdipNk,15787
|
|
5
5
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
6
6
|
lazyad/crawlers/qq.py,sha256=X_VjdgzAcDfckEAHrvdqBLtnmAuCBHPJVWu2H-IHZBA,5649
|
|
@@ -11,7 +11,7 @@ lazyad/open/kuaishou.py,sha256=B4wz3XW1hLQy7XR_nDQwrMUrYnm9Djec7OXKXRdiYXc,635
|
|
|
11
11
|
lazyad/open/mintegral.py,sha256=BXCaCfnz2iUsR-RtDSA8I27KSK8r4v3xkZfllD9q_vY,12788
|
|
12
12
|
lazyad/open/qq.py,sha256=pru1p4LCjURD9N5ukx-OStYAmDCvrTW4VMB2N0-3i5Q,6904
|
|
13
13
|
lazyad/open/unity.py,sha256=A0tEN5k40xq0v1cRnTLwRN5N7CBIe2oAyMRH1uxDAEw,8493
|
|
14
|
-
lazyad-0.0.
|
|
15
|
-
lazyad-0.0.
|
|
16
|
-
lazyad-0.0.
|
|
17
|
-
lazyad-0.0.
|
|
14
|
+
lazyad-0.0.74.dist-info/METADATA,sha256=rFSKNDB6drfswFPEuqqvDBM5B0feeoKgBF9e6EgQ1h0,1916
|
|
15
|
+
lazyad-0.0.74.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
16
|
+
lazyad-0.0.74.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
17
|
+
lazyad-0.0.74.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|