lazyad 0.0.27__tar.gz → 0.0.29__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.27 → lazyad-0.0.29}/PKG-INFO +1 -1
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/crawlers/chuangliang.py +40 -6
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.27 → lazyad-0.0.29}/setup.py +1 -1
- {lazyad-0.0.27 → lazyad-0.0.29}/README.md +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/__init__.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.27 → lazyad-0.0.29}/setup.cfg +0 -0
|
@@ -315,10 +315,13 @@ def update_ad_batch(
|
|
|
315
315
|
|
|
316
316
|
adgroup_id: int = None,
|
|
317
317
|
adgroup_ids: list = None,
|
|
318
|
+
|
|
318
319
|
advertiser_id: int = None,
|
|
319
320
|
advertiser_ids: list = None,
|
|
321
|
+
|
|
320
322
|
campaign_id: int = None,
|
|
321
323
|
campaign_ids: list = None,
|
|
324
|
+
|
|
322
325
|
adgroup_feed_id: int = None,
|
|
323
326
|
adgroup_feed_ids: list = None,
|
|
324
327
|
|
|
@@ -328,10 +331,7 @@ def update_ad_batch(
|
|
|
328
331
|
campaign_feed_id: int = None,
|
|
329
332
|
campaign_feed_ids: list = None,
|
|
330
333
|
|
|
331
|
-
operate: str = "disable"
|
|
332
|
-
|
|
333
|
-
end_point: str = None,
|
|
334
|
-
field: str = "disable",
|
|
334
|
+
operate: str = "disable"
|
|
335
335
|
):
|
|
336
336
|
"""
|
|
337
337
|
暂停广告
|
|
@@ -361,7 +361,7 @@ def update_ad_batch(
|
|
|
361
361
|
return
|
|
362
362
|
|
|
363
363
|
elif media_type == "baidu":
|
|
364
|
-
if
|
|
364
|
+
if adgroup_feed_id or adgroup_feed_ids:
|
|
365
365
|
url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
|
|
366
366
|
if adgroup_feed_id and not adgroup_feed_ids:
|
|
367
367
|
adgroup_feed_ids = [adgroup_feed_id]
|
|
@@ -369,7 +369,7 @@ def update_ad_batch(
|
|
|
369
369
|
"adgroup_feed_ids": adgroup_feed_ids,
|
|
370
370
|
"opt_status": operate
|
|
371
371
|
}
|
|
372
|
-
elif
|
|
372
|
+
elif campaign_feed_id or campaign_feed_ids:
|
|
373
373
|
url = "https://cli2.mobgi.com/Baidu/Campaign/batchUpdate"
|
|
374
374
|
if campaign_feed_id and not campaign_feed_ids:
|
|
375
375
|
campaign_feed_ids = [campaign_feed_id]
|
|
@@ -397,6 +397,40 @@ def update_ad_batch(
|
|
|
397
397
|
)
|
|
398
398
|
|
|
399
399
|
|
|
400
|
+
def update_creative_batch(
|
|
401
|
+
cookie,
|
|
402
|
+
media_type: str,
|
|
403
|
+
|
|
404
|
+
creative_ids: int = None,
|
|
405
|
+
advertiser_ids: list = None,
|
|
406
|
+
|
|
407
|
+
operate: str = "creative_disable"
|
|
408
|
+
):
|
|
409
|
+
"""
|
|
410
|
+
修改创意状态
|
|
411
|
+
:return:
|
|
412
|
+
"""
|
|
413
|
+
headers = copy.deepcopy(default_headers)
|
|
414
|
+
headers["Cookie"] = cookie
|
|
415
|
+
if media_type == "gdt_upgrade":
|
|
416
|
+
url = "https://cli2.mobgi.com/Gdt/MainList/updateCreativeBatchV1"
|
|
417
|
+
post_data = {
|
|
418
|
+
"advertiser_ids": advertiser_ids,
|
|
419
|
+
"creative_ids": creative_ids,
|
|
420
|
+
"value": "",
|
|
421
|
+
"field": operate
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
else:
|
|
425
|
+
return
|
|
426
|
+
return lazyrequests.lazy_requests(
|
|
427
|
+
method="POST",
|
|
428
|
+
url=url,
|
|
429
|
+
json=post_data,
|
|
430
|
+
headers=headers
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
|
|
400
434
|
def get_material_report(
|
|
401
435
|
cookie: str,
|
|
402
436
|
start_date: str = None,
|
|
@@ -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.29",
|
|
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
|