lazyad 0.0.23__tar.gz → 0.0.25__tar.gz
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-0.0.23 → lazyad-0.0.25}/PKG-INFO +1 -1
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/crawlers/chuangliang.py +28 -21
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.23 → lazyad-0.0.25}/setup.py +1 -1
- {lazyad-0.0.23 → lazyad-0.0.25}/README.md +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/__init__.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.23 → lazyad-0.0.25}/setup.cfg +0 -0
|
@@ -312,14 +312,19 @@ def get_plan_list(
|
|
|
312
312
|
def update_ad_batch(
|
|
313
313
|
cookie,
|
|
314
314
|
media_type: str,
|
|
315
|
-
|
|
315
|
+
|
|
316
316
|
adgroup_id: int = None,
|
|
317
317
|
adgroup_ids: list = None,
|
|
318
318
|
advertiser_id: int = None,
|
|
319
319
|
advertiser_ids: list = None,
|
|
320
320
|
campaign_id: int = None,
|
|
321
321
|
campaign_ids: list = None,
|
|
322
|
-
|
|
322
|
+
adgroup_feed_id: int = None,
|
|
323
|
+
adgroup_feed_ids: list = None,
|
|
324
|
+
operate: str = "disable",
|
|
325
|
+
|
|
326
|
+
end_point: str = None,
|
|
327
|
+
field: str = "disable",
|
|
323
328
|
):
|
|
324
329
|
"""
|
|
325
330
|
暂停广告
|
|
@@ -328,32 +333,34 @@ def update_ad_batch(
|
|
|
328
333
|
headers = copy.deepcopy(default_headers)
|
|
329
334
|
headers["Cookie"] = cookie
|
|
330
335
|
if media_type == "gdt_new":
|
|
331
|
-
if
|
|
336
|
+
if not advertiser_ids:
|
|
337
|
+
advertiser_ids = [advertiser_id]
|
|
338
|
+
post_data = {
|
|
339
|
+
"advertiser_ids": advertiser_ids,
|
|
340
|
+
"value": "",
|
|
341
|
+
"field": operate
|
|
342
|
+
}
|
|
343
|
+
if adgroup_id or adgroup_ids:
|
|
332
344
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateAdGroupBatch"
|
|
333
345
|
if not adgroup_ids:
|
|
334
346
|
adgroup_ids = [adgroup_id]
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
post_data = {
|
|
338
|
-
"adgroup_ids": adgroup_ids,
|
|
339
|
-
"advertiser_ids": advertiser_ids,
|
|
340
|
-
"value": "",
|
|
341
|
-
"field": field
|
|
342
|
-
}
|
|
343
|
-
elif end_point == 'updateCampaignBatch':
|
|
347
|
+
post_data["adgroup_ids"] = adgroup_ids
|
|
348
|
+
elif campaign_id or campaign_ids:
|
|
344
349
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateCampaignBatch"
|
|
345
350
|
if campaign_id and not campaign_ids:
|
|
346
351
|
campaign_ids = [campaign_id]
|
|
347
|
-
|
|
348
|
-
advertiser_ids = [advertiser_id]
|
|
349
|
-
post_data = {
|
|
350
|
-
"campaign_ids": campaign_ids,
|
|
351
|
-
"advertiser_ids": advertiser_ids,
|
|
352
|
-
"value": "",
|
|
353
|
-
"field": field
|
|
354
|
-
}
|
|
352
|
+
post_data["campaign_ids"] = campaign_ids
|
|
355
353
|
else:
|
|
356
354
|
return
|
|
355
|
+
|
|
356
|
+
elif media_type == "baidu":
|
|
357
|
+
url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
|
|
358
|
+
if not adgroup_feed_ids:
|
|
359
|
+
adgroup_feed_ids = [adgroup_feed_id]
|
|
360
|
+
post_data = {
|
|
361
|
+
"adgroup_feed_ids": adgroup_feed_ids,
|
|
362
|
+
"opt_status": operate
|
|
363
|
+
}
|
|
357
364
|
else:
|
|
358
365
|
return
|
|
359
366
|
return lazyrequests.lazy_requests(
|
|
@@ -392,7 +399,7 @@ def get_material_report(
|
|
|
392
399
|
:param data_type:
|
|
393
400
|
:param sort_direction:
|
|
394
401
|
:param sort_field:
|
|
395
|
-
:param time_dim:
|
|
402
|
+
:param time_dim: 时间维度的数据汇总方式,days:分日,sum:汇总
|
|
396
403
|
:param conditions:
|
|
397
404
|
:param kpis:
|
|
398
405
|
:param relate_dims:
|
|
@@ -13,7 +13,7 @@ with open("README.md", "r", encoding='utf-8') as fh:
|
|
|
13
13
|
|
|
14
14
|
setuptools.setup(
|
|
15
15
|
name="lazyad",
|
|
16
|
-
version="0.0.
|
|
16
|
+
version="0.0.25",
|
|
17
17
|
description="基于Python的懒人包-适用于广告投放模块",
|
|
18
18
|
long_description=long_description,
|
|
19
19
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|