lazyad 0.0.65__tar.gz → 0.0.67__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.65 → lazyad-0.0.67}/PKG-INFO +1 -1
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/chuangliang.py +21 -15
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.65 → lazyad-0.0.67}/setup.py +1 -1
- {lazyad-0.0.65 → lazyad-0.0.67}/README.md +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/__init__.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/mintegral.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/crawlers/wshoto.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/open/kuaishou.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/open/mintegral.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad/open/unity.py +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.65 → lazyad-0.0.67}/setup.cfg +0 -0
|
@@ -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,8 @@ 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,
|
|
80
|
+
db_type: str = "doris"
|
|
78
81
|
):
|
|
79
82
|
"""
|
|
80
83
|
报表-广告报表
|
|
@@ -98,7 +101,7 @@ def get_ad_report(
|
|
|
98
101
|
start_date = lazytime.get_date_string(days=0)
|
|
99
102
|
if not end_date:
|
|
100
103
|
end_date = lazytime.get_date_string(days=0)
|
|
101
|
-
url = "https://
|
|
104
|
+
url = f"https://{host}/ReportV23/AdReport/getReport"
|
|
102
105
|
data = {
|
|
103
106
|
"start_date": start_date,
|
|
104
107
|
"end_date": end_date,
|
|
@@ -110,6 +113,7 @@ def get_ad_report(
|
|
|
110
113
|
"data_dim": data_dim,
|
|
111
114
|
"sort_field": sort_field,
|
|
112
115
|
"sort_direction": sort_direction,
|
|
116
|
+
"db_type": db_type
|
|
113
117
|
}
|
|
114
118
|
if media_type == "baidu":
|
|
115
119
|
if not conditions:
|
|
@@ -132,7 +136,7 @@ def get_ad_report(
|
|
|
132
136
|
if not relate_dims:
|
|
133
137
|
relate_dims = ["advertiser_id"]
|
|
134
138
|
|
|
135
|
-
elif media_type
|
|
139
|
+
elif media_type in ["gdt_new", "gdt_upgrade"]:
|
|
136
140
|
if not conditions:
|
|
137
141
|
conditions = {
|
|
138
142
|
"keyword": "",
|
|
@@ -189,8 +193,8 @@ def get_ad_report(
|
|
|
189
193
|
relate_dims = ["advertiser_id"]
|
|
190
194
|
|
|
191
195
|
else:
|
|
192
|
-
showlog.warning("
|
|
193
|
-
|
|
196
|
+
showlog.warning("未知媒体类型,不指定默认参数")
|
|
197
|
+
pass
|
|
194
198
|
|
|
195
199
|
headers = copy.deepcopy(default_headers)
|
|
196
200
|
headers["Cookie"] = cookie
|
|
@@ -221,7 +225,8 @@ def get_plan_list(
|
|
|
221
225
|
cdt_start_date: str = None,
|
|
222
226
|
cdt_end_date: str = None,
|
|
223
227
|
kpis: list = None,
|
|
224
|
-
req_source: str = None
|
|
228
|
+
req_source: str = None,
|
|
229
|
+
host: str = default_host,
|
|
225
230
|
):
|
|
226
231
|
"""
|
|
227
232
|
获取推广计划
|
|
@@ -261,7 +266,7 @@ def get_plan_list(
|
|
|
261
266
|
"data_type": data_type
|
|
262
267
|
}
|
|
263
268
|
if media_type == "baidu":
|
|
264
|
-
url = "https://
|
|
269
|
+
url = f"https://{host}/Baidu/Campaign/getList"
|
|
265
270
|
if not conditions:
|
|
266
271
|
conditions = {
|
|
267
272
|
"cl_project_id": [],
|
|
@@ -278,7 +283,7 @@ def get_plan_list(
|
|
|
278
283
|
conditions["media_account_id"] = [media_account_id]
|
|
279
284
|
data["conditions"] = json.dumps(conditions)
|
|
280
285
|
elif media_type == "gdt_new":
|
|
281
|
-
url = "https://
|
|
286
|
+
url = f"https://{host}/Gdt/MainList/getList"
|
|
282
287
|
if not conditions:
|
|
283
288
|
conditions = {
|
|
284
289
|
"is_deleted": "",
|
|
@@ -333,7 +338,8 @@ def update_ad_batch(
|
|
|
333
338
|
campaign_feed_id: int = None,
|
|
334
339
|
campaign_feed_ids: list = None,
|
|
335
340
|
|
|
336
|
-
operate: str = "disable"
|
|
341
|
+
operate: str = "disable",
|
|
342
|
+
host: str = default_host
|
|
337
343
|
):
|
|
338
344
|
"""
|
|
339
345
|
暂停广告
|
|
@@ -350,12 +356,12 @@ def update_ad_batch(
|
|
|
350
356
|
"field": operate
|
|
351
357
|
}
|
|
352
358
|
if adgroup_id or adgroup_ids:
|
|
353
|
-
url = "https://
|
|
359
|
+
url = f"https://{host}/Gdt/MainList/updateAdGroupBatch"
|
|
354
360
|
if not adgroup_ids:
|
|
355
361
|
adgroup_ids = [adgroup_id]
|
|
356
362
|
post_data["adgroup_ids"] = adgroup_ids
|
|
357
363
|
elif campaign_id or campaign_ids:
|
|
358
|
-
url = "https://
|
|
364
|
+
url = f"https://{host}/Gdt/MainList/updateCampaignBatch"
|
|
359
365
|
if campaign_id and not campaign_ids:
|
|
360
366
|
campaign_ids = [campaign_id]
|
|
361
367
|
post_data["campaign_ids"] = campaign_ids
|
|
@@ -364,7 +370,7 @@ def update_ad_batch(
|
|
|
364
370
|
|
|
365
371
|
elif media_type == "baidu":
|
|
366
372
|
if adgroup_feed_id or adgroup_feed_ids:
|
|
367
|
-
url = "https://
|
|
373
|
+
url = f"https://{host}/Baidu/AdGroup/batchUpdate"
|
|
368
374
|
if adgroup_feed_id and not adgroup_feed_ids:
|
|
369
375
|
adgroup_feed_ids = [adgroup_feed_id]
|
|
370
376
|
post_data = {
|
|
@@ -372,7 +378,7 @@ def update_ad_batch(
|
|
|
372
378
|
"opt_status": operate
|
|
373
379
|
}
|
|
374
380
|
elif campaign_feed_id or campaign_feed_ids:
|
|
375
|
-
url = "https://
|
|
381
|
+
url = f"https://{host}/Baidu/Campaign/batchUpdate"
|
|
376
382
|
if campaign_feed_id and not campaign_feed_ids:
|
|
377
383
|
campaign_feed_ids = [campaign_feed_id]
|
|
378
384
|
post_data = {
|
|
@@ -382,7 +388,7 @@ def update_ad_batch(
|
|
|
382
388
|
else:
|
|
383
389
|
return
|
|
384
390
|
elif media_type == "toutiao_upgrade":
|
|
385
|
-
url = "https://
|
|
391
|
+
url = f"https://{host}/Toutiao/Promotion/updateStatus"
|
|
386
392
|
if promotion_id and not promotion_ids:
|
|
387
393
|
promotion_ids = [promotion_id]
|
|
388
394
|
post_data = {
|
|
@@ -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.67",
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|