lazyad 0.0.56__tar.gz → 0.0.58__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.56 → lazyad-0.0.58}/PKG-INFO +1 -1
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/crawlers/chuangliang.py +40 -1
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.56 → lazyad-0.0.58}/setup.py +1 -1
- {lazyad-0.0.56 → lazyad-0.0.58}/README.md +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/__init__.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/crawlers/mintegral.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/open/kuaishou.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/open/mintegral.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad/open/unity.py +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.56 → lazyad-0.0.58}/setup.cfg +0 -0
|
@@ -840,22 +840,61 @@ def get_project_report(
|
|
|
840
840
|
def get_material_detail(
|
|
841
841
|
cookie: str,
|
|
842
842
|
material_id: str,
|
|
843
|
+
host: str = None
|
|
843
844
|
):
|
|
844
845
|
"""
|
|
845
846
|
获取素材详情
|
|
846
847
|
:param cookie:
|
|
847
848
|
:param material_id: 素材ID
|
|
849
|
+
:param host:
|
|
848
850
|
:return:
|
|
849
851
|
"""
|
|
850
|
-
url = "https://
|
|
852
|
+
url = f"https://{host}/Material/Manage/detail"
|
|
851
853
|
data = {
|
|
852
854
|
"material_id": material_id
|
|
853
855
|
}
|
|
854
856
|
headers = copy.deepcopy(default_headers)
|
|
855
857
|
headers["Cookie"] = cookie
|
|
858
|
+
if host:
|
|
859
|
+
headers["Host"] = host
|
|
856
860
|
return lazyrequests.lazy_requests(
|
|
857
861
|
method="GET",
|
|
858
862
|
url=url,
|
|
859
863
|
params=data,
|
|
860
864
|
headers=headers
|
|
861
865
|
)
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
def deactivate_material(
|
|
869
|
+
cookie: str,
|
|
870
|
+
is_deactivate: int,
|
|
871
|
+
material_id: str = None,
|
|
872
|
+
material_ids: list = None,
|
|
873
|
+
host: str = None
|
|
874
|
+
):
|
|
875
|
+
"""
|
|
876
|
+
启用/禁用素材
|
|
877
|
+
:param cookie:
|
|
878
|
+
:param is_deactivate: 0:启用,1:禁用
|
|
879
|
+
:param material_id: 素材ID
|
|
880
|
+
:param material_ids: [素材ID]
|
|
881
|
+
:param host:
|
|
882
|
+
:return:
|
|
883
|
+
"""
|
|
884
|
+
url = f"https://{host}/Material/Manage/deactivate"
|
|
885
|
+
if not material_ids:
|
|
886
|
+
material_ids = [material_id]
|
|
887
|
+
data = {
|
|
888
|
+
"material_ids": material_ids,
|
|
889
|
+
"is_deactivate": is_deactivate
|
|
890
|
+
}
|
|
891
|
+
headers = copy.deepcopy(default_headers)
|
|
892
|
+
headers["Cookie"] = cookie
|
|
893
|
+
if host:
|
|
894
|
+
headers["Host"] = host
|
|
895
|
+
return lazyrequests.lazy_requests(
|
|
896
|
+
method="POST",
|
|
897
|
+
url=url,
|
|
898
|
+
json=data,
|
|
899
|
+
headers=headers
|
|
900
|
+
)
|
|
@@ -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.58",
|
|
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
|