lazyad 0.0.34__py3-none-any.whl → 0.0.35__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 +47 -0
- {lazyad-0.0.34.dist-info → lazyad-0.0.35.dist-info}/METADATA +1 -1
- {lazyad-0.0.34.dist-info → lazyad-0.0.35.dist-info}/RECORD +5 -5
- {lazyad-0.0.34.dist-info → lazyad-0.0.35.dist-info}/WHEEL +0 -0
- {lazyad-0.0.34.dist-info → lazyad-0.0.35.dist-info}/top_level.txt +0 -0
lazyad/crawlers/chuangliang.py
CHANGED
|
@@ -701,3 +701,50 @@ def update_budget_batch(
|
|
|
701
701
|
json=data,
|
|
702
702
|
headers=headers
|
|
703
703
|
)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
def get_task_result(
|
|
707
|
+
cookie: str,
|
|
708
|
+
batch_id: str
|
|
709
|
+
):
|
|
710
|
+
"""
|
|
711
|
+
获取任务结果
|
|
712
|
+
:param cookie:
|
|
713
|
+
:param batch_id:
|
|
714
|
+
:return:
|
|
715
|
+
"""
|
|
716
|
+
url = "https://cli2.mobgi.com/Toutiao/Tools/getTaskResult"
|
|
717
|
+
data = {"batch_id": batch_id}
|
|
718
|
+
headers = copy.deepcopy(default_headers)
|
|
719
|
+
headers["Cookie"] = cookie
|
|
720
|
+
return lazyrequests.lazy_requests(
|
|
721
|
+
method="POST",
|
|
722
|
+
url=url,
|
|
723
|
+
json=data,
|
|
724
|
+
headers=headers
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
def get_task_result_end(
|
|
729
|
+
cookie: str,
|
|
730
|
+
batch_id: str
|
|
731
|
+
):
|
|
732
|
+
"""
|
|
733
|
+
获取任务结果,等待任务结束
|
|
734
|
+
:param cookie:
|
|
735
|
+
:param batch_id:
|
|
736
|
+
:return:
|
|
737
|
+
"""
|
|
738
|
+
while True:
|
|
739
|
+
res = get_task_result(
|
|
740
|
+
cookie=cookie,
|
|
741
|
+
batch_id=batch_id
|
|
742
|
+
)
|
|
743
|
+
if res.get("code") == 0:
|
|
744
|
+
processing = res["data"]["processing"]
|
|
745
|
+
if not processing:
|
|
746
|
+
return res
|
|
747
|
+
else:
|
|
748
|
+
lazytime.count_down(1)
|
|
749
|
+
else:
|
|
750
|
+
return res
|
|
@@ -1,11 +1,11 @@
|
|
|
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=WudIJ_eDjlp9e-9A5aitCJZj441EuT8yZ-6jECB4WYA,21897
|
|
4
4
|
lazyad/crawlers/oceanengine.py,sha256=kjBEpCb_h5OpodCTqzvXd5MBBwAuw3Oq5UKWoTCXrQM,4540
|
|
5
5
|
lazyad/crawlers/qq.py,sha256=mAVOP1TOGVD1juu77uKBauN7vLymukTJ1mJ8uyRh9a8,3230
|
|
6
6
|
lazyad/open/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
lazyad/open/qq.py,sha256=B6HWnBmtF3mbpwto1wqi7j-auK73Kzp8ESxeUpvLHRA,4391
|
|
8
|
-
lazyad-0.0.
|
|
9
|
-
lazyad-0.0.
|
|
10
|
-
lazyad-0.0.
|
|
11
|
-
lazyad-0.0.
|
|
8
|
+
lazyad-0.0.35.dist-info/METADATA,sha256=GBXz_Oc4PPvhEJBB9OaEboCsFxcsXRtVm89GjtnL9q8,1695
|
|
9
|
+
lazyad-0.0.35.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
10
|
+
lazyad-0.0.35.dist-info/top_level.txt,sha256=RAPjtj4gZYpsKAM3fAQrWyyn84xjdRuaiUS76gx6eNs,7
|
|
11
|
+
lazyad-0.0.35.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|