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

@@ -312,14 +312,19 @@ def get_plan_list(
312
312
  def update_ad_batch(
313
313
  cookie,
314
314
  media_type: str,
315
- end_point: str,
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
- field: str = "disable"
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 end_point == 'updateAdGroupBatch':
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
- if not advertiser_ids:
336
- advertiser_ids = [advertiser_id]
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
- if advertiser_id and advertiser_ids:
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.23
3
+ Version: 0.0.25
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=WWE4SKVOajbMRJaxtz5kZh8VvD9BoA0W_TkIiL_VR5k,14934
3
+ lazyad/crawlers/chuangliang.py,sha256=FeoFvE-GP69ukAcIT5UMJUTZFYWmcXOnZ-PiD5Q5APQ,15140
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.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,,
8
+ lazyad-0.0.25.dist-info/METADATA,sha256=MPIxmZ7ucAb-Ps8TTFPVGxG-Gnx-qhUJpk5vQiAfJow,1695
9
+ lazyad-0.0.25.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
10
+ lazyad-0.0.25.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
11
+ lazyad-0.0.25.dist-info/RECORD,,