lazyad 0.0.24__py3-none-any.whl → 0.0.26__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.
- lazyad/crawlers/chuangliang.py +28 -21
- {lazyad-0.0.24.dist-info → lazyad-0.0.26.dist-info}/METADATA +1 -1
- {lazyad-0.0.24.dist-info → lazyad-0.0.26.dist-info}/RECORD +5 -5
- {lazyad-0.0.24.dist-info → lazyad-0.0.26.dist-info}/WHEEL +0 -0
- {lazyad-0.0.24.dist-info → lazyad-0.0.26.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -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,14 @@ 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
|
+
|
|
325
|
+
promotion_id: int = None,
|
|
326
|
+
promotion_ids: list = None,
|
|
327
|
+
|
|
328
|
+
operate: str = "disable",
|
|
329
|
+
|
|
330
|
+
end_point: str = None,
|
|
324
331
|
field: str = "disable",
|
|
325
|
-
operate: str = "disable"
|
|
326
332
|
):
|
|
327
333
|
"""
|
|
328
334
|
暂停广告
|
|
@@ -331,32 +337,26 @@ def update_ad_batch(
|
|
|
331
337
|
headers = copy.deepcopy(default_headers)
|
|
332
338
|
headers["Cookie"] = cookie
|
|
333
339
|
if media_type == "gdt_new":
|
|
334
|
-
if
|
|
340
|
+
if not advertiser_ids:
|
|
341
|
+
advertiser_ids = [advertiser_id]
|
|
342
|
+
post_data = {
|
|
343
|
+
"advertiser_ids": advertiser_ids,
|
|
344
|
+
"value": "",
|
|
345
|
+
"field": operate
|
|
346
|
+
}
|
|
347
|
+
if adgroup_id or adgroup_ids:
|
|
335
348
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateAdGroupBatch"
|
|
336
349
|
if not adgroup_ids:
|
|
337
350
|
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':
|
|
351
|
+
post_data["adgroup_ids"] = adgroup_ids
|
|
352
|
+
elif campaign_id or campaign_ids:
|
|
347
353
|
url = "https://cli2.mobgi.com/Gdt/MainList/updateCampaignBatch"
|
|
348
354
|
if campaign_id and not campaign_ids:
|
|
349
355
|
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
|
-
}
|
|
356
|
+
post_data["campaign_ids"] = campaign_ids
|
|
358
357
|
else:
|
|
359
358
|
return
|
|
359
|
+
|
|
360
360
|
elif media_type == "baidu":
|
|
361
361
|
url = "https://cli2.mobgi.com/Baidu/AdGroup/batchUpdate"
|
|
362
362
|
if not adgroup_feed_ids:
|
|
@@ -365,7 +365,14 @@ def update_ad_batch(
|
|
|
365
365
|
"adgroup_feed_ids": adgroup_feed_ids,
|
|
366
366
|
"opt_status": operate
|
|
367
367
|
}
|
|
368
|
-
|
|
368
|
+
elif media_type == "toutiao_upgrade":
|
|
369
|
+
url = "https://cli2.mobgi.com/Toutiao/Promotion/updateStatus"
|
|
370
|
+
if promotion_id and not promotion_ids:
|
|
371
|
+
promotion_ids = [promotion_id]
|
|
372
|
+
post_data = {
|
|
373
|
+
"promotion_ids": promotion_ids,
|
|
374
|
+
"opt_status": operate
|
|
375
|
+
}
|
|
369
376
|
else:
|
|
370
377
|
return
|
|
371
378
|
return lazyrequests.lazy_requests(
|
|
@@ -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=
|
|
3
|
+
lazyad/crawlers/chuangliang.py,sha256=Pt1T28Uln2w-B8xc57gmYi2typ4ZcOept0BmfVarhJA,15524
|
|
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.
|
|
9
|
-
lazyad-0.0.
|
|
10
|
-
lazyad-0.0.
|
|
11
|
-
lazyad-0.0.
|
|
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,,
|
|
File without changes
|
|
File without changes
|