lazyad 0.0.21__py3-none-any.whl → 0.0.23__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 +131 -3
- {lazyad-0.0.21.dist-info → lazyad-0.0.23.dist-info}/METADATA +1 -1
- {lazyad-0.0.21.dist-info → lazyad-0.0.23.dist-info}/RECORD +5 -5
- {lazyad-0.0.21.dist-info → lazyad-0.0.23.dist-info}/WHEEL +0 -0
- {lazyad-0.0.21.dist-info → lazyad-0.0.23.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -283,7 +283,7 @@ def get_plan_list(
|
|
|
283
283
|
"project_id": [],
|
|
284
284
|
"advertiser_id": [],
|
|
285
285
|
"user_id": [],
|
|
286
|
-
"configured_status": [],
|
|
286
|
+
"configured_status": ["STATUS_NO_DELETED"], # 所有未删除
|
|
287
287
|
"keyword": "",
|
|
288
288
|
"companys": [],
|
|
289
289
|
"time_line": "REPORTING_TIME",
|
|
@@ -342,9 +342,9 @@ def update_ad_batch(
|
|
|
342
342
|
}
|
|
343
343
|
elif end_point == 'updateCampaignBatch':
|
|
344
344
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateCampaignBatch"
|
|
345
|
-
if not
|
|
345
|
+
if campaign_id and not campaign_ids:
|
|
346
346
|
campaign_ids = [campaign_id]
|
|
347
|
-
if
|
|
347
|
+
if advertiser_id and advertiser_ids:
|
|
348
348
|
advertiser_ids = [advertiser_id]
|
|
349
349
|
post_data = {
|
|
350
350
|
"campaign_ids": campaign_ids,
|
|
@@ -362,3 +362,131 @@ def update_ad_batch(
|
|
|
362
362
|
json=post_data,
|
|
363
363
|
headers=headers
|
|
364
364
|
)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
def get_material_report(
|
|
368
|
+
cookie: str,
|
|
369
|
+
start_date: str = None,
|
|
370
|
+
end_date: str = None,
|
|
371
|
+
page: int = 1,
|
|
372
|
+
page_size: int = 20,
|
|
373
|
+
media_type: str = "aggregate",
|
|
374
|
+
kpis: list = None,
|
|
375
|
+
sort_field: str = None,
|
|
376
|
+
time_dim: str = "days",
|
|
377
|
+
data_dim: str = "material",
|
|
378
|
+
data_type: str = "list",
|
|
379
|
+
sort_direction: str = "desc",
|
|
380
|
+
conditions: dict = None,
|
|
381
|
+
relate_dims: list = None
|
|
382
|
+
):
|
|
383
|
+
"""
|
|
384
|
+
报表-素材报表
|
|
385
|
+
:param cookie:
|
|
386
|
+
:param start_date:
|
|
387
|
+
:param end_date:
|
|
388
|
+
:param page:
|
|
389
|
+
:param page_size:
|
|
390
|
+
:param media_type:媒体:gdt_new|广点通(新指标体系),toutiao_upgrade|今日头条2.0,aggregate|不限,baidu:百度信息流
|
|
391
|
+
:param data_dim:
|
|
392
|
+
:param data_type:
|
|
393
|
+
:param sort_direction:
|
|
394
|
+
:param sort_field:
|
|
395
|
+
:param time_dim:
|
|
396
|
+
:param conditions:
|
|
397
|
+
:param kpis:
|
|
398
|
+
:param relate_dims:
|
|
399
|
+
:return:
|
|
400
|
+
"""
|
|
401
|
+
if not start_date:
|
|
402
|
+
start_date = lazytime.get_date_string(days=0)
|
|
403
|
+
if not end_date:
|
|
404
|
+
end_date = lazytime.get_date_string(days=0)
|
|
405
|
+
url = "https://cli2.mobgi.com/ReportV23/MaterialReport/getReport"
|
|
406
|
+
data = {
|
|
407
|
+
"time_dim": time_dim,
|
|
408
|
+
"media_type": media_type,
|
|
409
|
+
"data_type": data_type,
|
|
410
|
+
"data_dim": data_dim,
|
|
411
|
+
"sort_field": sort_field,
|
|
412
|
+
"sort_direction": sort_direction,
|
|
413
|
+
"start_date": start_date,
|
|
414
|
+
"end_date": end_date,
|
|
415
|
+
"page": page,
|
|
416
|
+
"page_size": page_size
|
|
417
|
+
}
|
|
418
|
+
if media_type == "baidu":
|
|
419
|
+
if not conditions:
|
|
420
|
+
conditions = {
|
|
421
|
+
"search_type": "name",
|
|
422
|
+
"media_project_id": [],
|
|
423
|
+
"material_special_id": [],
|
|
424
|
+
"make_user_id": [],
|
|
425
|
+
"advertiser_id": [],
|
|
426
|
+
"owner_user_id": [],
|
|
427
|
+
"media_advertiser_company": [],
|
|
428
|
+
"material_type": "",
|
|
429
|
+
"label_ids": [],
|
|
430
|
+
"material_group_id": []
|
|
431
|
+
}
|
|
432
|
+
if not kpis:
|
|
433
|
+
kpis = [
|
|
434
|
+
"cost",
|
|
435
|
+
"weixinfollowsuccessconversions",
|
|
436
|
+
"weixinfollowsuccessconversionscost",
|
|
437
|
+
"payreaduv",
|
|
438
|
+
"payreaduvcost"
|
|
439
|
+
]
|
|
440
|
+
if not relate_dims:
|
|
441
|
+
relate_dims = [
|
|
442
|
+
"material_create_time",
|
|
443
|
+
"owner_user_id",
|
|
444
|
+
"creative_user_id",
|
|
445
|
+
"adgroup_feed_id"
|
|
446
|
+
]
|
|
447
|
+
elif media_type == "gdt_new":
|
|
448
|
+
if not conditions:
|
|
449
|
+
conditions = {
|
|
450
|
+
"advertiser_id": [],
|
|
451
|
+
"label_ids": [],
|
|
452
|
+
"make_user_id": [],
|
|
453
|
+
"material_group_id": [],
|
|
454
|
+
"material_special_id": [],
|
|
455
|
+
"material_type": "",
|
|
456
|
+
"media_advertiser_company": [],
|
|
457
|
+
"media_project_id": [],
|
|
458
|
+
"owner_user_id": [],
|
|
459
|
+
"search_type": "name"
|
|
460
|
+
}
|
|
461
|
+
if not kpis:
|
|
462
|
+
kpis = [
|
|
463
|
+
"cost",
|
|
464
|
+
"cheout_fd",
|
|
465
|
+
"cheout_fd_reward",
|
|
466
|
+
"first_pay_count",
|
|
467
|
+
"first_pay_cost",
|
|
468
|
+
"conversions_count",
|
|
469
|
+
"conversions_cost",
|
|
470
|
+
"from_follow_uv",
|
|
471
|
+
"from_follow_cost",
|
|
472
|
+
"thousand_display_price"
|
|
473
|
+
]
|
|
474
|
+
if not relate_dims:
|
|
475
|
+
relate_dims = []
|
|
476
|
+
else:
|
|
477
|
+
pass
|
|
478
|
+
|
|
479
|
+
if conditions:
|
|
480
|
+
data["conditions"] = conditions
|
|
481
|
+
if kpis:
|
|
482
|
+
data["kpis"] = kpis
|
|
483
|
+
if relate_dims:
|
|
484
|
+
data["relate_dims"] = relate_dims
|
|
485
|
+
headers = copy.deepcopy(default_headers)
|
|
486
|
+
headers["Cookie"] = cookie
|
|
487
|
+
return lazyrequests.lazy_requests(
|
|
488
|
+
method="POST",
|
|
489
|
+
url=url,
|
|
490
|
+
json=data,
|
|
491
|
+
headers=headers
|
|
492
|
+
)
|
|
@@ -1,11 +1,11 @@
|
|
|
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=WWE4SKVOajbMRJaxtz5kZh8VvD9BoA0W_TkIiL_VR5k,14934
|
|
4
4
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
5
5
|
lazyad/crawlers/qq.py,sha256=mAVOP1TOGVD1juu77uKBauN7vLymukTJ1mJ8uyRh9a8,3230
|
|
6
6
|
lazyad/open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
lazyad/open/qq.py,sha256=B6HWnBmtF3mbpwto1wqi7j-auK73Kzp8ESxeUpvLHRA,4391
|
|
8
|
-
lazyad-0.0.
|
|
9
|
-
lazyad-0.0.
|
|
10
|
-
lazyad-0.0.
|
|
11
|
-
lazyad-0.0.
|
|
8
|
+
lazyad-0.0.23.dist-info/METADATA,sha256=2apvOdiMU0o8pvgo_vQrA3J4K6d1BLG__eLKnZphHRc,1695
|
|
9
|
+
lazyad-0.0.23.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
10
|
+
lazyad-0.0.23.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
11
|
+
lazyad-0.0.23.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|