lazyad 0.0.33__tar.gz → 0.0.35__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.33 → lazyad-0.0.35}/PKG-INFO +1 -1
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/crawlers/chuangliang.py +55 -1
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad.egg-info/PKG-INFO +1 -1
- {lazyad-0.0.33 → lazyad-0.0.35}/setup.py +1 -1
- {lazyad-0.0.33 → lazyad-0.0.35}/README.md +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/__init__.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/crawlers/__init__.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/crawlers/oceanengine.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/crawlers/qq.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/open/__init__.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad/open/qq.py +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad.egg-info/SOURCES.txt +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad.egg-info/dependency_links.txt +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad.egg-info/requires.txt +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/lazyad.egg-info/top_level.txt +0 -0
- {lazyad-0.0.33 → lazyad-0.0.35}/setup.cfg +0 -0
|
@@ -675,7 +675,14 @@ def update_budget_batch(
|
|
|
675
675
|
}
|
|
676
676
|
]
|
|
677
677
|
elif media_account_ids:
|
|
678
|
-
inner_data = list(
|
|
678
|
+
inner_data = list()
|
|
679
|
+
for media_account_id_ in media_account_ids:
|
|
680
|
+
inner_data.append(
|
|
681
|
+
{
|
|
682
|
+
"media_account_id": media_account_id_,
|
|
683
|
+
"daily_budget": daily_budget
|
|
684
|
+
}
|
|
685
|
+
)
|
|
679
686
|
else:
|
|
680
687
|
return
|
|
681
688
|
data = {
|
|
@@ -694,3 +701,50 @@ def update_budget_batch(
|
|
|
694
701
|
json=data,
|
|
695
702
|
headers=headers
|
|
696
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
|
|
@@ -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.35",
|
|
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
|