lazyad 0.0.63__tar.gz → 0.0.64__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.63
3
+ Version: 0.0.64
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -0,0 +1,2 @@
1
+ from . import crawlers
2
+ from . import open
@@ -0,0 +1,3 @@
1
+ from . import qq
2
+ from . import oceanengine
3
+ from . import chuangliang
@@ -20,6 +20,7 @@ default_headers = {
20
20
  "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0",
21
21
  }
22
22
  default_host = "cli2.mobgi.com"
23
+ hosts = ["cli1.mobgi.com", "cli2.mobgi.com"]
23
24
 
24
25
 
25
26
  def get_media_account(
@@ -446,7 +447,8 @@ def get_material_report(
446
447
  data_type: str = "list",
447
448
  sort_direction: str = "desc",
448
449
  conditions: dict = None,
449
- relate_dims: list = None
450
+ relate_dims: list = None,
451
+ host: str = "cli2.mobgi.com",
450
452
  ):
451
453
  """
452
454
  报表-素材报表
@@ -455,22 +457,26 @@ def get_material_report(
455
457
  :param end_date:
456
458
  :param page:
457
459
  :param page_size:
458
- :param media_type:媒体:gdt_new|广点通(新指标体系),toutiao_upgrade|今日头条2.0aggregate|不限,baidu:百度信息流
459
- :param data_dim:
460
+ :param media_type:媒体:gdt_new|广点通(新指标体系),toutiao_upgrade|今日头条2.0/巨量广告,aggregate|不限,baidu:百度信息流
461
+ :param data_dim: 数据维度:素材
460
462
  :param data_type:
461
- :param sort_direction:
462
- :param sort_field:
463
+ :param sort_direction: 排序
464
+ :param sort_field: 排序字段,stat_cost:消耗
463
465
  :param time_dim: 时间维度的数据汇总方式,days:分日,sum:汇总
464
466
  :param conditions:
465
467
  :param kpis:
466
- :param relate_dims:
468
+ :param relate_dims:关联维度,
469
+ material_create_time:上传时间 --> material_create_time
470
+ owner_user_id:优化师 --> user_name
471
+ creative_user_id:创意人 --> creative_user
472
+ :param host:
467
473
  :return:
468
474
  """
469
475
  if not start_date:
470
476
  start_date = lazytime.get_date_string(days=0)
471
477
  if not end_date:
472
478
  end_date = lazytime.get_date_string(days=0)
473
- url = "https://cli2.mobgi.com/ReportV23/MaterialReport/getReport"
479
+ url = f"https://{host}/ReportV23/MaterialReport/getReport"
474
480
  data = {
475
481
  "time_dim": time_dim,
476
482
  "media_type": media_type,
@@ -0,0 +1,31 @@
1
+ from lazysdk import lazyrequests
2
+
3
+
4
+ def postback(
5
+ callback: str,
6
+ event_time: int,
7
+ event_type: int,
8
+ purchase_amount=None
9
+ ):
10
+ """
11
+ 快手回传
12
+ :param callback:
13
+ :param event_time: 时间戳,单位秒
14
+ :param event_type:
15
+ :param purchase_amount:
16
+ :return:
17
+ """
18
+ # result=1上报成功
19
+ params = {
20
+ "event_type": event_type,
21
+ "event_time": event_time,
22
+ }
23
+ if purchase_amount:
24
+ params["purchase_amount"] = purchase_amount
25
+ res = lazyrequests.lazy_requests(
26
+ method="GET",
27
+ url=callback,
28
+ params=params
29
+ )
30
+ return res
31
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lazyad
3
- Version: 0.0.63
3
+ Version: 0.0.64
4
4
  Summary: 基于Python的懒人包-适用于广告投放模块
5
5
  Home-page: https://gitee.com/ZeroSeeker/lazyad
6
6
  Author: ZeroSeeker
@@ -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.63",
16
+ version="0.0.64",
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