lazyad 0.0.65__py3-none-any.whl → 0.0.66__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 +16 -12
- {lazyad-0.0.65.dist-info → lazyad-0.0.66.dist-info}/METADATA +1 -1
- {lazyad-0.0.65.dist-info → lazyad-0.0.66.dist-info}/RECORD +5 -5
- {lazyad-0.0.65.dist-info → lazyad-0.0.66.dist-info}/WHEEL +0 -0
- {lazyad-0.0.65.dist-info → lazyad-0.0.66.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -28,7 +28,8 @@ def get_media_account(
|
|
|
28
28
|
cookie: str = None,
|
|
29
29
|
page: int = 1,
|
|
30
30
|
page_size: int = 20,
|
|
31
|
-
total_count: int = 0
|
|
31
|
+
total_count: int = 0,
|
|
32
|
+
host: str = default_host,
|
|
32
33
|
):
|
|
33
34
|
"""
|
|
34
35
|
获取 推广-账户管理下的账户列表
|
|
@@ -40,7 +41,7 @@ def get_media_account(
|
|
|
40
41
|
:return:
|
|
41
42
|
"""
|
|
42
43
|
|
|
43
|
-
url = 'https://
|
|
44
|
+
url = f'https://{host}/Media/Account/getList'
|
|
44
45
|
data = {
|
|
45
46
|
"media_type": media_type,
|
|
46
47
|
"advertiser_type": "1",
|
|
@@ -75,6 +76,7 @@ def get_ad_report(
|
|
|
75
76
|
conditions: dict = None,
|
|
76
77
|
kpis: list = None,
|
|
77
78
|
relate_dims: list = None,
|
|
79
|
+
host: str = default_host,
|
|
78
80
|
):
|
|
79
81
|
"""
|
|
80
82
|
报表-广告报表
|
|
@@ -98,7 +100,7 @@ def get_ad_report(
|
|
|
98
100
|
start_date = lazytime.get_date_string(days=0)
|
|
99
101
|
if not end_date:
|
|
100
102
|
end_date = lazytime.get_date_string(days=0)
|
|
101
|
-
url = "https://
|
|
103
|
+
url = f"https://{host}/ReportV23/AdReport/getReport"
|
|
102
104
|
data = {
|
|
103
105
|
"start_date": start_date,
|
|
104
106
|
"end_date": end_date,
|
|
@@ -221,7 +223,8 @@ def get_plan_list(
|
|
|
221
223
|
cdt_start_date: str = None,
|
|
222
224
|
cdt_end_date: str = None,
|
|
223
225
|
kpis: list = None,
|
|
224
|
-
req_source: str = None
|
|
226
|
+
req_source: str = None,
|
|
227
|
+
host: str = default_host,
|
|
225
228
|
):
|
|
226
229
|
"""
|
|
227
230
|
获取推广计划
|
|
@@ -261,7 +264,7 @@ def get_plan_list(
|
|
|
261
264
|
"data_type": data_type
|
|
262
265
|
}
|
|
263
266
|
if media_type == "baidu":
|
|
264
|
-
url = "https://
|
|
267
|
+
url = f"https://{host}/Baidu/Campaign/getList"
|
|
265
268
|
if not conditions:
|
|
266
269
|
conditions = {
|
|
267
270
|
"cl_project_id": [],
|
|
@@ -278,7 +281,7 @@ def get_plan_list(
|
|
|
278
281
|
conditions["media_account_id"] = [media_account_id]
|
|
279
282
|
data["conditions"] = json.dumps(conditions)
|
|
280
283
|
elif media_type == "gdt_new":
|
|
281
|
-
url = "https://
|
|
284
|
+
url = f"https://{host}/Gdt/MainList/getList"
|
|
282
285
|
if not conditions:
|
|
283
286
|
conditions = {
|
|
284
287
|
"is_deleted": "",
|
|
@@ -333,7 +336,8 @@ def update_ad_batch(
|
|
|
333
336
|
campaign_feed_id: int = None,
|
|
334
337
|
campaign_feed_ids: list = None,
|
|
335
338
|
|
|
336
|
-
operate: str = "disable"
|
|
339
|
+
operate: str = "disable",
|
|
340
|
+
host: str = default_host
|
|
337
341
|
):
|
|
338
342
|
"""
|
|
339
343
|
暂停广告
|
|
@@ -350,12 +354,12 @@ def update_ad_batch(
|
|
|
350
354
|
"field": operate
|
|
351
355
|
}
|
|
352
356
|
if adgroup_id or adgroup_ids:
|
|
353
|
-
url = "https://
|
|
357
|
+
url = f"https://{host}/Gdt/MainList/updateAdGroupBatch"
|
|
354
358
|
if not adgroup_ids:
|
|
355
359
|
adgroup_ids = [adgroup_id]
|
|
356
360
|
post_data["adgroup_ids"] = adgroup_ids
|
|
357
361
|
elif campaign_id or campaign_ids:
|
|
358
|
-
url = "https://
|
|
362
|
+
url = f"https://{host}/Gdt/MainList/updateCampaignBatch"
|
|
359
363
|
if campaign_id and not campaign_ids:
|
|
360
364
|
campaign_ids = [campaign_id]
|
|
361
365
|
post_data["campaign_ids"] = campaign_ids
|
|
@@ -364,7 +368,7 @@ def update_ad_batch(
|
|
|
364
368
|
|
|
365
369
|
elif media_type == "baidu":
|
|
366
370
|
if adgroup_feed_id or adgroup_feed_ids:
|
|
367
|
-
url = "https://
|
|
371
|
+
url = f"https://{host}/Baidu/AdGroup/batchUpdate"
|
|
368
372
|
if adgroup_feed_id and not adgroup_feed_ids:
|
|
369
373
|
adgroup_feed_ids = [adgroup_feed_id]
|
|
370
374
|
post_data = {
|
|
@@ -372,7 +376,7 @@ def update_ad_batch(
|
|
|
372
376
|
"opt_status": operate
|
|
373
377
|
}
|
|
374
378
|
elif campaign_feed_id or campaign_feed_ids:
|
|
375
|
-
url = "https://
|
|
379
|
+
url = f"https://{host}/Baidu/Campaign/batchUpdate"
|
|
376
380
|
if campaign_feed_id and not campaign_feed_ids:
|
|
377
381
|
campaign_feed_ids = [campaign_feed_id]
|
|
378
382
|
post_data = {
|
|
@@ -382,7 +386,7 @@ def update_ad_batch(
|
|
|
382
386
|
else:
|
|
383
387
|
return
|
|
384
388
|
elif media_type == "toutiao_upgrade":
|
|
385
|
-
url = "https://
|
|
389
|
+
url = f"https://{host}/Toutiao/Promotion/updateStatus"
|
|
386
390
|
if promotion_id and not promotion_ids:
|
|
387
391
|
promotion_ids = [promotion_id]
|
|
388
392
|
post_data = {
|
|
@@ -1,6 +1,6 @@
|
|
|
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=EofgBxyMYALAjLOy4OSt1-8KeFaCjQ6srfcWyw5Nl7g,28580
|
|
4
4
|
lazyad/crawlers/mintegral.py,sha256=FNd9CAZd0x_jZdrSKunODYGJJb6EJofmq0kQzSDu2Yg,11154
|
|
5
5
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
6
6
|
lazyad/crawlers/qq.py,sha256=X_VjdgzAcDfckEAHrvdqBLtnmAuCBHPJVWu2H-IHZBA,5649
|
|
@@ -10,7 +10,7 @@ lazyad/open/kuaishou.py,sha256=B4wz3XW1hLQy7XR_nDQwrMUrYnm9Djec7OXKXRdiYXc,635
|
|
|
10
10
|
lazyad/open/mintegral.py,sha256=BXCaCfnz2iUsR-RtDSA8I27KSK8r4v3xkZfllD9q_vY,12788
|
|
11
11
|
lazyad/open/qq.py,sha256=pru1p4LCjURD9N5ukx-OStYAmDCvrTW4VMB2N0-3i5Q,6904
|
|
12
12
|
lazyad/open/unity.py,sha256=A0tEN5k40xq0v1cRnTLwRN5N7CBIe2oAyMRH1uxDAEw,8493
|
|
13
|
-
lazyad-0.0.
|
|
14
|
-
lazyad-0.0.
|
|
15
|
-
lazyad-0.0.
|
|
16
|
-
lazyad-0.0.
|
|
13
|
+
lazyad-0.0.66.dist-info/METADATA,sha256=0Y3Jh7pcdmVxVSEWsI_8V2M8YcVhiz86UIcYbXce3ws,1916
|
|
14
|
+
lazyad-0.0.66.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
15
|
+
lazyad-0.0.66.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
16
|
+
lazyad-0.0.66.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|