lazyad 0.0.24__tar.gz → 0.0.25__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.24 → lazyad-0.0.25}/PKG-INFO +1 -1
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/crawlers/chuangliang.py +16 -21
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.24 → lazyad-0.0.25}/setup.py +1 -1
- {lazyad-0.0.24 → lazyad-0.0.25}/README.md +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/__init__.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.24 → lazyad-0.0.25}/setup.cfg +0 -0
|
@@ -312,7 +312,7 @@ def get_plan_list(
|
|
|
312
312
|
def update_ad_batch(
|
|
313
313
|
cookie,
|
|
314
314
|
media_type: str,
|
|
315
|
-
|
|
315
|
+
|
|
316
316
|
adgroup_id: int = None,
|
|
317
317
|
adgroup_ids: list = None,
|
|
318
318
|
advertiser_id: int = None,
|
|
@@ -321,8 +321,10 @@ def update_ad_batch(
|
|
|
321
321
|
campaign_ids: list = None,
|
|
322
322
|
adgroup_feed_id: int = None,
|
|
323
323
|
adgroup_feed_ids: list = None,
|
|
324
|
+
operate: str = "disable",
|
|
325
|
+
|
|
326
|
+
end_point: str = None,
|
|
324
327
|
field: str = "disable",
|
|
325
|
-
operate: str = "disable"
|
|
326
328
|
):
|
|
327
329
|
"""
|
|
328
330
|
暂停广告
|
|
@@ -331,32 +333,26 @@ def update_ad_batch(
|
|
|
331
333
|
headers = copy.deepcopy(default_headers)
|
|
332
334
|
headers["Cookie"] = cookie
|
|
333
335
|
if media_type == "gdt_new":
|
|
334
|
-
if
|
|
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:
|
|
335
344
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateAdGroupBatch"
|
|
336
345
|
if not adgroup_ids:
|
|
337
346
|
adgroup_ids = [adgroup_id]
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
post_data = {
|
|
341
|
-
"adgroup_ids": adgroup_ids,
|
|
342
|
-
"advertiser_ids": advertiser_ids,
|
|
343
|
-
"value": "",
|
|
344
|
-
"field": field
|
|
345
|
-
}
|
|
346
|
-
elif end_point == 'updateCampaignBatch':
|
|
347
|
+
post_data["adgroup_ids"] = adgroup_ids
|
|
348
|
+
elif campaign_id or campaign_ids:
|
|
347
349
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateCampaignBatch"
|
|
348
350
|
if campaign_id and not campaign_ids:
|
|
349
351
|
campaign_ids = [campaign_id]
|
|
350
|
-
|
|
351
|
-
advertiser_ids = [advertiser_id]
|
|
352
|
-
post_data = {
|
|
353
|
-
"campaign_ids": campaign_ids,
|
|
354
|
-
"advertiser_ids": advertiser_ids,
|
|
355
|
-
"value": "",
|
|
356
|
-
"field": field
|
|
357
|
-
}
|
|
352
|
+
post_data["campaign_ids"] = campaign_ids
|
|
358
353
|
else:
|
|
359
354
|
return
|
|
355
|
+
|
|
360
356
|
elif media_type == "baidu":
|
|
361
357
|
url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
|
|
362
358
|
if not adgroup_feed_ids:
|
|
@@ -365,7 +361,6 @@ def update_ad_batch(
|
|
|
365
361
|
"adgroup_feed_ids": adgroup_feed_ids,
|
|
366
362
|
"opt_status": operate
|
|
367
363
|
}
|
|
368
|
-
|
|
369
364
|
else:
|
|
370
365
|
return
|
|
371
366
|
return lazyrequests.lazy_requests(
|
|
@@ -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.25",
|
|
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
|