lazyad 0.0.20__tar.gz → 0.0.22__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.
- {lazyad-0.0.20 → lazyad-0.0.22}/PKG-INFO +1 -1
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/crawlers/chuangliang.py +56 -1
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.20 → lazyad-0.0.22}/setup.py +1 -1
- {lazyad-0.0.20 → lazyad-0.0.22}/README.md +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/__init__.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.20 → lazyad-0.0.22}/setup.cfg +0 -0
|
@@ -283,7 +283,7 @@ def get_plan_list(
|
|
|
283
283
|
"project_id": [],
|
|
284
284
|
"advertiser_id": [],
|
|
285
285
|
"user_id": [],
|
|
286
|
-
"configured_status": [],
|
|
286
|
+
"configured_status": ["STATUS_NO_DELETED"], # 所有未删除
|
|
287
287
|
"keyword": "",
|
|
288
288
|
"companys": [],
|
|
289
289
|
"time_line": "REPORTING_TIME",
|
|
@@ -307,3 +307,58 @@ def get_plan_list(
|
|
|
307
307
|
json=data,
|
|
308
308
|
headers=headers
|
|
309
309
|
)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
def update_ad_batch(
|
|
313
|
+
cookie,
|
|
314
|
+
media_type: str,
|
|
315
|
+
end_point: str,
|
|
316
|
+
adgroup_id: int = None,
|
|
317
|
+
adgroup_ids: list = None,
|
|
318
|
+
advertiser_id: int = None,
|
|
319
|
+
advertiser_ids: list = None,
|
|
320
|
+
campaign_id: int = None,
|
|
321
|
+
campaign_ids: list = None,
|
|
322
|
+
field: str = "disable"
|
|
323
|
+
):
|
|
324
|
+
"""
|
|
325
|
+
暂停广告
|
|
326
|
+
:return:
|
|
327
|
+
"""
|
|
328
|
+
headers = copy.deepcopy(default_headers)
|
|
329
|
+
headers["Cookie"] = cookie
|
|
330
|
+
if media_type == "gdt_new":
|
|
331
|
+
if end_point == 'updateAdGroupBatch':
|
|
332
|
+
url = "https://cli2.mobgi.com/Gdt/MainList/updateAdGroupBatch"
|
|
333
|
+
if not adgroup_ids:
|
|
334
|
+
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':
|
|
344
|
+
url = "https://cli2.mobgi.com/Gdt/MainList/updateCampaignBatch"
|
|
345
|
+
if campaign_id and not campaign_ids:
|
|
346
|
+
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
|
+
}
|
|
355
|
+
else:
|
|
356
|
+
return
|
|
357
|
+
else:
|
|
358
|
+
return
|
|
359
|
+
return lazyrequests.lazy_requests(
|
|
360
|
+
method="POST",
|
|
361
|
+
url=url,
|
|
362
|
+
json=post_data,
|
|
363
|
+
headers=headers
|
|
364
|
+
)
|
|
@@ -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.22",
|
|
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
|