lazyad 0.0.20__py3-none-any.whl → 0.0.21__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 +55 -0
- {lazyad-0.0.20.dist-info → lazyad-0.0.21.dist-info}/METADATA +1 -1
- {lazyad-0.0.20.dist-info → lazyad-0.0.21.dist-info}/RECORD +5 -5
- {lazyad-0.0.20.dist-info → lazyad-0.0.21.dist-info}/WHEEL +0 -0
- {lazyad-0.0.20.dist-info → lazyad-0.0.21.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -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 not campaign_id:
|
|
346
|
+
campaign_ids = [campaign_id]
|
|
347
|
+
if not 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
|
+
)
|
|
@@ -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=F0Sr6mqT_YZdV-MM32YQarZIIfw21lsnq9oKBhAQgQo,11082
|
|
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.21.dist-info/METADATA,sha256=m6xmYUly9IOxX8fY7ctspy58zS8BeeMkZiQseBumkzk,1695
|
|
9
|
+
lazyad-0.0.21.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
10
|
+
lazyad-0.0.21.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
11
|
+
lazyad-0.0.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|