lazyad 0.0.35__tar.gz → 0.0.36__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.35 → lazyad-0.0.36}/PKG-INFO +1 -1
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/crawlers/chuangliang.py +87 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.35 → lazyad-0.0.36}/setup.py +1 -1
- {lazyad-0.0.35 → lazyad-0.0.36}/README.md +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/__init__.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.35 → lazyad-0.0.36}/setup.cfg +0 -0
|
@@ -748,3 +748,90 @@ def get_task_result_end(
|
|
|
748
748
|
lazytime.count_down(1)
|
|
749
749
|
else:
|
|
750
750
|
return res
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
def get_project_report(
|
|
754
|
+
cookie: str,
|
|
755
|
+
media_type: str = "aggregate",
|
|
756
|
+
start_date: str = None,
|
|
757
|
+
end_date: str = None,
|
|
758
|
+
page: int = 1,
|
|
759
|
+
page_size: int = 20,
|
|
760
|
+
sort_field: str = "aggregate_cost",
|
|
761
|
+
sort_direction: str = "desc",
|
|
762
|
+
data_type: str = "list",
|
|
763
|
+
conditions: dict = None,
|
|
764
|
+
kpis: list = None,
|
|
765
|
+
relate_dims: list = None,
|
|
766
|
+
time_line: str = "REPORTING_TIME",
|
|
767
|
+
time_dim: str = "days",
|
|
768
|
+
data_dim: str = "media_project_id"
|
|
769
|
+
):
|
|
770
|
+
"""
|
|
771
|
+
报表-项目报表
|
|
772
|
+
:param cookie:
|
|
773
|
+
:param media_type: 媒体:aggregate|不限
|
|
774
|
+
:param start_date: 数据开始日期,默认为当日
|
|
775
|
+
:param end_date: 数据结束日期,默认为当日
|
|
776
|
+
:param page: 页码
|
|
777
|
+
:param page_size: 每页数量
|
|
778
|
+
:param sort_field: 排序字段
|
|
779
|
+
:param sort_direction: 排序方式,desc降序
|
|
780
|
+
:param data_type:
|
|
781
|
+
:param conditions: 搜索条件
|
|
782
|
+
:param kpis: 需要获取的字段
|
|
783
|
+
:param relate_dims:
|
|
784
|
+
:param time_line:
|
|
785
|
+
:param time_dim:
|
|
786
|
+
:param data_dim:
|
|
787
|
+
:return:
|
|
788
|
+
"""
|
|
789
|
+
if not start_date:
|
|
790
|
+
start_date = lazytime.get_date_string(days=0)
|
|
791
|
+
if not end_date:
|
|
792
|
+
end_date = lazytime.get_date_string(days=0)
|
|
793
|
+
url = "https://cli2.mobgi.com/ReportV23/ProjectReport/getReport"
|
|
794
|
+
data = {
|
|
795
|
+
"time_dim": time_dim,
|
|
796
|
+
"media_type": media_type,
|
|
797
|
+
"data_type": data_type,
|
|
798
|
+
"data_dim": data_dim,
|
|
799
|
+
"sort_field": sort_field,
|
|
800
|
+
"sort_direction": sort_direction,
|
|
801
|
+
"start_date": start_date,
|
|
802
|
+
"end_date": end_date,
|
|
803
|
+
"page": page,
|
|
804
|
+
"page_size": page_size
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
if not conditions:
|
|
808
|
+
conditions = {
|
|
809
|
+
"media_project_id": [],
|
|
810
|
+
"advertiser_id": [],
|
|
811
|
+
"media_type": "",
|
|
812
|
+
"project_id": [],
|
|
813
|
+
"owner_user_id": [],
|
|
814
|
+
"media_agent_id": [],
|
|
815
|
+
"time_line": time_line
|
|
816
|
+
}
|
|
817
|
+
if not kpis:
|
|
818
|
+
kpis = [
|
|
819
|
+
"aggregate_cost"
|
|
820
|
+
]
|
|
821
|
+
if not relate_dims:
|
|
822
|
+
relate_dims = [
|
|
823
|
+
"owner_user_id",
|
|
824
|
+
"media_type"
|
|
825
|
+
]
|
|
826
|
+
|
|
827
|
+
headers = copy.deepcopy(default_headers)
|
|
828
|
+
headers["Cookie"] = cookie
|
|
829
|
+
data["conditions"] = conditions
|
|
830
|
+
data["kpis"] = kpis
|
|
831
|
+
data["relate_dims"] = relate_dims
|
|
832
|
+
return lazyrequests.lazy_requests(
|
|
833
|
+
method="POST",
|
|
834
|
+
url=url,
|
|
835
|
+
json=data,
|
|
836
|
+
headers=headers
|
|
837
|
+
)
|
|
@@ -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.36",
|
|
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
|