添加【爱奇艺】10s 任务

This commit is contained in:
shitao 2021-03-12 08:12:23 +08:00
parent 9b9821570e
commit 0a6399985f

View File

@ -11,7 +11,6 @@ class IQIYICheckIn:
def __init__(self, check_item):
self.check_item = check_item
self.task_list = []
self.growth_task = 0
@staticmethod
def parse_cookie(cookie):
@ -108,24 +107,23 @@ class IQIYICheckIn:
"""
url = "https://tc.vip.iqiyi.com/taskCenter/task/getTaskRewards"
params = {"P00001": p00001, "taskCode": "", "platform": "bb136ff4276771f3", "lang": "zh_CN"}
for one in range(3):
for item in self.task_list:
time.sleep(2)
if item["status"] == 0:
params["taskCode"] = item["taskCode"]
res = requests.get(url=url, params=params)
if res.json()["code"] == "A00000":
self.growth_task += item["taskReward"]
elif item["status"] == 4:
requests.get(
url='https://tc.vip.iqiyi.com/taskCenter/task/notify',
params=params
)
params["taskCode"] = item["taskCode"]
res = requests.get(url=url, params=params)
if res.json()["code"] == "A00000":
self.growth_task += item["taskReward"]
msg = f"+{self.growth_task}成长值"
growth_task = 0
for item in self.task_list:
if item["status"] == 0:
params["taskCode"] = item["taskCode"]
res = requests.get(url=url, params=params)
if res.json()["code"] == "A00000":
growth_task += item["taskReward"]
elif item["status"] == 4:
requests.get(
url='https://tc.vip.iqiyi.com/taskCenter/task/notify',
params=params
)
params["taskCode"] = item["taskCode"]
res = requests.get(url=url, params=params)
if res.json()["code"] == "A00000":
growth_task += item["taskReward"]
msg = f"+{growth_task}成长值"
return msg
@staticmethod
@ -180,9 +178,12 @@ class IQIYICheckIn:
draw_msg += ret["msg"] + ";" if ret["status"] else ""
else:
draw_msg = "抽奖机会不足"
self.query_user_task(p00001=p00001)
self.join_task(p00001=p00001)
task_msg = self.get_task_rewards(p00001=p00001)
task_msg = ""
for one in range(3):
self.query_user_task(p00001=p00001)
self.join_task(p00001=p00001)
task_msg = self.get_task_rewards(p00001=p00001)
time.sleep(10)
user_msg = self.user_information(p00001=p00001)
msg = f"{user_msg}\n" f"签到奖励: {sign_msg}\n任务奖励: {task_msg}\n抽奖奖励: {draw_msg}"
return msg