lazyad 0.0.26__py3-none-any.whl → 0.0.28__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,20 +315,23 @@ 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
 
325
328
  promotion_id: int = None,
326
329
  promotion_ids: list = None,
327
330
 
328
- operate: str = "disable",
331
+ campaign_feed_id: int = None,
332
+ campaign_feed_ids: list = None,
329
333
 
330
- end_point: str = None,
331
- field: str = "disable",
334
+ operate: str = "disable"
332
335
  ):
333
336
  """
334
337
  暂停广告
@@ -358,13 +361,24 @@ def update_ad_batch(
358
361
  return
359
362
 
360
363
  elif media_type == "baidu":
361
- url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
362
- if not adgroup_feed_ids:
363
- adgroup_feed_ids = [adgroup_feed_id]
364
- post_data = {
365
- "adgroup_feed_ids": adgroup_feed_ids,
366
- "opt_status": operate
367
- }
364
+ if adgroup_feed_id or adgroup_feed_ids:
365
+ url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
366
+ if adgroup_feed_id and not adgroup_feed_ids:
367
+ adgroup_feed_ids = [adgroup_feed_id]
368
+ post_data = {
369
+ "adgroup_feed_ids": adgroup_feed_ids,
370
+ "opt_status": operate
371
+ }
372
+ elif campaign_feed_id or campaign_feed_ids:
373
+ url = "https://cli2.mobgi.com/Baidu/Campaign/batchUpdate"
374
+ if campaign_feed_id and not campaign_feed_ids:
375
+ campaign_feed_ids = [campaign_feed_id]
376
+ post_data = {
377
+ "campaign_feed_ids": campaign_feed_ids,
378
+ "opt_status": operate
379
+ }
380
+ else:
381
+ return
368
382
  elif media_type == "toutiao_upgrade":
369
383
  url = "https://cli2.mobgi.com/Toutiao/Promotion/updateStatus"
370
384
  if promotion_id and not promotion_ids:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.26
3
+ Version: 0.0.28
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=Pt1T28Uln2w-B8xc57gmYi2typ4ZcOept0BmfVarhJA,15524
3
+ lazyad/crawlers/chuangliang.py,sha256=S-QxkGC9K3btwBmzITiWr-eWZ7zP3zwryWWr8Eqm7aU,16040
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.26.dist-info/METADATA,sha256=RKp1jaamIP24FNHqBIIOUzdn8uzcC66URkM4_gLoYkw,1695
9
- lazyad-0.0.26.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
- lazyad-0.0.26.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
- lazyad-0.0.26.dist-info/RECORD,,
8
+ lazyad-0.0.28.dist-info/METADATA,sha256=4oP67y2eudXKZEg0tHIbz_JfiN_dLQC9ZqSUx9wGfrY,1695
9
+ lazyad-0.0.28.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
+ lazyad-0.0.28.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
+ lazyad-0.0.28.dist-info/RECORD,,