Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Update index.py,ZZX大佬指导,加入异常处理,支持wust #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wust-lzy
Copy link

@wust-lzy wust-lzy commented Dec 9, 2020

No description provided.

@mrjesen
Copy link
Contributor

mrjesen commented Dec 9, 2020

感谢大佬,api我拿走了,正研究抓一个,没想到就有人pr了,感谢~

task = getDetailTask(session, params, apis)
form = fillForm(task, session, user, apis)
# form = getDetailTask(session, user, params, apis)
i+=1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这也太freestyle了原来的异常处理是可以用的,你这样搞每次只能签一个任务,碰到多个任务的话最新任务会一直停在同一个任务上

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

然后你这里i+=1有啥用

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

计数

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多任务可以用啊,在yaml里面多填几个

Copy link

@ghost ghost Dec 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

假如latestTask还没到签到时间呢,但是unsignedtasks不止一个的情况,这样还没到签到时间的latestTask就会占住到签到时间的那个任务,这个情况你考虑过吗?

# cookieStr可以使用手动抓包获取到的cookie,有效期暂时未知,请自己测试
# cookieStr = str(res.json()['cookies'])
cookieStr = str(res.json()['cookies'])
# log(cookieStr) 调试时再输出
log(cookieStr)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在github actions情况下请不要随意输出cookies,有安全风险

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants