lazyad 0.0.57__py3-none-any.whl → 0.0.59__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 +38 -2
- {lazyad-0.0.57.dist-info → lazyad-0.0.59.dist-info}/METADATA +1 -1
- {lazyad-0.0.57.dist-info → lazyad-0.0.59.dist-info}/RECORD +5 -5
- {lazyad-0.0.57.dist-info → lazyad-0.0.59.dist-info}/WHEEL +0 -0
- {lazyad-0.0.57.dist-info → lazyad-0.0.59.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -19,6 +19,7 @@ default_headers = {
|
|
|
19
19
|
"TE": "trailers",
|
|
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
|
+
default_host = "cli2.mobgi.com"
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
def get_media_account(
|
|
@@ -840,7 +841,7 @@ def get_project_report(
|
|
|
840
841
|
def get_material_detail(
|
|
841
842
|
cookie: str,
|
|
842
843
|
material_id: str,
|
|
843
|
-
host: str =
|
|
844
|
+
host: str = default_host
|
|
844
845
|
):
|
|
845
846
|
"""
|
|
846
847
|
获取素材详情
|
|
@@ -849,7 +850,7 @@ def get_material_detail(
|
|
|
849
850
|
:param host:
|
|
850
851
|
:return:
|
|
851
852
|
"""
|
|
852
|
-
url = "https://
|
|
853
|
+
url = f"https://{host}/Material/Manage/detail"
|
|
853
854
|
data = {
|
|
854
855
|
"material_id": material_id
|
|
855
856
|
}
|
|
@@ -863,3 +864,38 @@ def get_material_detail(
|
|
|
863
864
|
params=data,
|
|
864
865
|
headers=headers
|
|
865
866
|
)
|
|
867
|
+
|
|
868
|
+
|
|
869
|
+
def deactivate_material(
|
|
870
|
+
cookie: str,
|
|
871
|
+
is_deactivate: int,
|
|
872
|
+
material_id: str = None,
|
|
873
|
+
material_ids: list = None,
|
|
874
|
+
host: str = default_host
|
|
875
|
+
):
|
|
876
|
+
"""
|
|
877
|
+
启用/禁用素材
|
|
878
|
+
:param cookie:
|
|
879
|
+
:param is_deactivate: 0:启用,1:禁用
|
|
880
|
+
:param material_id: 素材ID
|
|
881
|
+
:param material_ids: [素材ID]
|
|
882
|
+
:param host:
|
|
883
|
+
:return:
|
|
884
|
+
"""
|
|
885
|
+
url = f"https://{host}/Material/Manage/deactivate"
|
|
886
|
+
if not material_ids:
|
|
887
|
+
material_ids = [material_id]
|
|
888
|
+
data = {
|
|
889
|
+
"material_ids": material_ids,
|
|
890
|
+
"is_deactivate": is_deactivate
|
|
891
|
+
}
|
|
892
|
+
headers = copy.deepcopy(default_headers)
|
|
893
|
+
headers["Cookie"] = cookie
|
|
894
|
+
if host:
|
|
895
|
+
headers["Host"] = host
|
|
896
|
+
return lazyrequests.lazy_requests(
|
|
897
|
+
method="POST",
|
|
898
|
+
url=url,
|
|
899
|
+
json=data,
|
|
900
|
+
headers=headers
|
|
901
|
+
)
|
|
@@ -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=QsEKTKcLn2WC3kW9pHnRG2O30r1kC2mmS-CSO7IKpaw,25794
|
|
4
4
|
lazyad/crawlers/mintegral.py,sha256=awhS2yb48nh5f_yENyUy_vsleuMivrBsYbqrM7eS2jM,9622
|
|
5
5
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
6
6
|
lazyad/crawlers/qq.py,sha256=X_VjdgzAcDfckEAHrvdqBLtnmAuCBHPJVWu2H-IHZBA,5649
|
|
@@ -9,7 +9,7 @@ lazyad/open/kuaishou.py,sha256=B4wz3XW1hLQy7XR_nDQwrMUrYnm9Djec7OXKXRdiYXc,635
|
|
|
9
9
|
lazyad/open/mintegral.py,sha256=BXCaCfnz2iUsR-RtDSA8I27KSK8r4v3xkZfllD9q_vY,12788
|
|
10
10
|
lazyad/open/qq.py,sha256=pru1p4LCjURD9N5ukx-OStYAmDCvrTW4VMB2N0-3i5Q,6904
|
|
11
11
|
lazyad/open/unity.py,sha256=A0tEN5k40xq0v1cRnTLwRN5N7CBIe2oAyMRH1uxDAEw,8493
|
|
12
|
-
lazyad-0.0.
|
|
13
|
-
lazyad-0.0.
|
|
14
|
-
lazyad-0.0.
|
|
15
|
-
lazyad-0.0.
|
|
12
|
+
lazyad-0.0.59.dist-info/METADATA,sha256=IiSfmBQWG1tLd98pEkPXn6iXml726bDctSLtMzty7IA,1918
|
|
13
|
+
lazyad-0.0.59.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
14
|
+
lazyad-0.0.59.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
15
|
+
lazyad-0.0.59.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|