lazyad 0.0.27__py3-none-any.whl → 0.0.29__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.

@@ -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 not adgroup_feed_id or not adgroup_feed_ids:
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 not campaign_feed_id or not campaign_feed_ids:
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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.27
3
+ Version: 0.0.29
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -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=IjTMzzF_Z_ISgPrtlFGLALr7ojDEYtgF0r6B26QZ3jg,16118
3
+ lazyad/crawlers/chuangliang.py,sha256=-QtnKQ4ZAYn5YnVqihfhIs6wR7uZCZ5gvO13TS5P-Wc,16799
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.27.dist-info/METADATA,sha256=RmGrcG6eyXZFk6xPcS5lkF-kEUxsUm4s0ohCRAEspLM,1695
9
- lazyad-0.0.27.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
- lazyad-0.0.27.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
- lazyad-0.0.27.dist-info/RECORD,,
8
+ lazyad-0.0.29.dist-info/METADATA,sha256=xxr7dYz7aqjIIRRtDqAsO9NnoSgk1YxonkohF0D3z2c,1695
9
+ lazyad-0.0.29.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
+ lazyad-0.0.29.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
+ lazyad-0.0.29.dist-info/RECORD,,