GithubHelp home page GithubHelp logo

jimlee2002 / actions-wozaixiaoyuanpuncher Goto Github PK

View Code? Open in Web Editor NEW
85.0 2.0 353.0 118 KB

我在校园自动打卡程序:WoZaiXiaoYuanPuncher 的 Github Action 版。

License: Apache License 2.0

Python 100.00%
github-actions actions

actions-wozaixiaoyuanpuncher's People

Contributors

baifan97 avatar gz4zzxc avatar iridescent-9 avatar jimlee2048 avatar leslieleung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

actions-wozaixiaoyuanpuncher's Issues

执行时报错

执行时报错,修改Cache name后执行一次正常,下一次自动执行又报错
Run python wzxy-dailyreport.py
找到cache文件,尝试使用jwsession打卡...
获取打卡列表中...
jwsession 无效,将尝试使用账号信息重新登录
使用账号信息登录成功
找到cache文件,正在更新cache中的jwsession...
Traceback (most recent call last):
File "/home/runner/work/WoZaiXiaoYuanPuncher-Actions/WoZaiXiaoYuanPuncher-Actions/wzxy-dailyreport.py", line 235, in
wzxy.PunchIn()
File "/home/runner/work/WoZaiXiaoYuanPuncher-Actions/WoZaiXiaoYuanPuncher-Actions/wzxy-dailyreport.py", line 91, in PunchIn
loginStatus = self.login()
File "/home/runner/work/WoZaiXiaoYuanPuncher-Actions/WoZaiXiaoYuanPuncher-Actions/wzxy-dailyreport.py", line 44, in login
self.setJwsession(jwsession)
File "/home/runner/work/WoZaiXiaoYuanPuncher-Actions/WoZaiXiaoYuanPuncher-Actions/wzxy-dailyreport.py", line 67, in setJwsession
item['jwsession'] = jwsession
TypeError: 'str' object does not support item assignment
Error: Process completed with exit code 1.

多配置文件打卡失败

在配置USER_01时就遇见这个问题,后隔夜再尝试成功登陆了。在进行USER_02配置时又遇见此问题。environment与secrets配置正确。目前状态为USER_01可以正常打卡,USER_02显示打卡失败,登录信息错误。(严格遵守日志要求修改密码退出再运行脚本)

4月17日打卡异常

Run python wzxy-dailyreport.py
找到cache文件,尝试使用jwsession打卡...
获取打卡列表中...
正在进行:早打卡...
{'code': 7, 'message': '服务异常(7)'}
打卡失败
消息经 pushplus 推送成功

登录错误

提示登录错误,请检查账号信息,但是账号信息已经更新过了,求教

[Help] pushplus推送异常('code': 999,无效的用户token)

问题如下

详细输出log
截取片段

. . .
2021-12-30T08:35:01.7112565Z   WZXY_STREET: ***
2021-12-30T08:35:01.7113189Z   WZXY_AREACODE: ***
2021-12-30T08:35:01.7113794Z ##[endgroup]
2021-12-30T08:35:03.5714674Z 找到cache文件,尝试使用jwsession打卡...
2021-12-30T08:35:03.5715712Z 正在打卡...
2021-12-30T08:35:03.5716502Z 打卡成功
2021-12-30T08:35:03.5717474Z {'code': 999, 'msg': '无效的用户token', 'data': None}
2021-12-30T08:35:03.5718794Z 消息经 pushplus 推送失败,请检查错误信息
2021-12-30T08:35:03.5783290Z Post job cleanup.
. . .

备注:

根据实际抓包情况,自行添加了部分打卡数据(地区代码)
测试时将pushplus token直接写到了代码里

WZXY_AREACODE: ${{secrets.AREACODE}}

抓包数据截图:

save json

重新运行脚本后无法打开

前两天因长时间未改动脚本而自动关闭,再次运行之后便无法自动打卡,但是手动运行可以打卡。(报错信息:打卡失败 发生未知错误)

bark的一点坑

当bark_token输入为http://domain/token/
即以斜杠结尾时,bark无法推送

if os.environ.get('BARK_TOKEN'):
            # bark 推送
            notifyToken = os.environ['BARK_TOKEN']
            req = "{}/{}/{}".format(notifyToken, "⏰ 我在校园打卡(日检日报)结果通知", notifyResult)
            requests.get(req)
            print("消息经bark推送成功")

打卡地点异常

在我在校园小程序内成功打卡与日检但地址为一串字符,可能与Environment secrets存储内容相关

账号密码错误 报错如下·

Run python wzxy-dailyreport.py
python wzxy-dailyreport.py
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.9.10/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.10/x64/lib
DD_BOT_ACCESS_TOKEN:
DD_BOT_SECRET:
SCT_KEY:
BARK_TOKEN:
PUSHPLUS_TOKEN:
MIAO_CODE:
WZXY_USERNAME:
WZXY_PASSWORD:
WZXY_TEMPERATURE:
WZXY_LATITUDE:
WZXY_LONGITUDE:
WZXY_COUNTRY:
WZXY_CITY:
WZXY_DISTRICT:
WZXY_PROVINCE:
WZXY_TOWNSHIP:
WZXY_STREET:
WZXY_ANSWERS:
找不到cache文件,正在使用账号信息登录...
{'code': 1, 'message': '请输入用户名和密码'}
登录失败,请检查账号信息
登陆失败,请检查账号信息

无法登录

无法登录

源码能够正常运行,按照文档中的方法操作后依旧无法登录,输出账号或密码错误(环境中的密码正确)重置密码以后依旧不成功。
image

Project dependencies may have API risk issues

Hi, In Actions-WoZaiXiaoYuanPuncher, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

requests==2.26.0
urllib3==1.26.7
pytz==2021.3

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency requests can be changed to >=0.7.0,<=2.24.0.
The version constraint of dependency requests can be changed to ==2.26.0.
The version constraint of dependency pytz can be changed to >=2011d,<=2013d.
The version constraint of dependency pytz can be changed to >=2011b,<=2022.1.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

The calling methods from the requests
requests.get
requests.session
requests.post
The calling methods from the pytz
pytz.timezone
The calling methods from the all methods
WoZaiXiaoYuanPuncher
self.setJwsession
utils.processJson.write
self.getJwsession
hashlib.sha256.string_to_sign_enc.secret_enc.hmac.new.digest
DD_BOT_SECRET.encode
url.format
self.login
round
temperature.split
self.PunchIn
utils.processJson
WoZaiXiaoYuanPuncher.doPunchIn
random.uniform
hmac.new
str
json.dump
requests.session
url.requests.get.json
int
json.load
os.environ.get
self.getResult
msg.json.dumps.encode
headers.data.json.dumps.url.requests.post.json
json.dumps
format.encode
random.seed
open
time.ctime
headers.body.url.requests.post.json
time.time
urllib.parse.quote_plus
base64.b64encode
pytz.timezone
datetime.datetime.now
os.path.exists
float
urllib.parse.urlencode
requests.get
json.loads
pytz.timezone.datetime.datetime.now.strftime
print
WoZaiXiaoYuanPuncher.login
os.mkdir
os.environ.cur_time.os.environ.encode
utils.getRandomTemperature
hashlib.sha256
WoZaiXiaoYuanPuncher.PunchIn
file.close
format
WoZaiXiaoYuanPuncher.sendNotification
utils.getCurrentTime
temperature.find
os.environ.cur_time.os.environ.encode.hashlib.sha256.hexdigest
self.doPunchIn
self.getSeq
self.session.post
requests.post
utils.processJson.read

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.

日检日报可以登录,而健康打卡登陆失败

健康打卡提示如下:
找不到cache文件,正在使用账号信息登录...
{'code': 1, 'message': '请输入用户名和密码'}
登录失败,请检查账号信息
登陆失败,请检查账号信息

日检日报提示如下:
Run python wzxy-dailyreport.py
找到cache文件,尝试使用jwsession打卡...
获取打卡列表中...
打卡失败:不在打卡时间段内

定位错误导致提交失败

data当中的经纬度和街道、乡镇是否要对应,还是必须填写目前所处的位置的定位,我这里返回的信息为:未找到街道信息。
求解决方法,谢谢!!!

自定义ANSWER的错误导致打卡记录无法正常提交

Jim你好。

我校的小程序的「健康打卡」栏目包括三个选项+一个获取位置定位,如图:
IMG_2882

抓包得到answers的参数是["0","1","1"]
并无任何「温度」选项。

然而按照["0","1","1"] 填写Secrets ANSWERS后,运行Action后,提醒打卡成功,查看日志无异,然而点进小程序检查情况时,各选项没有被勾选,只有定位正确,点击打卡记录返回「500错误」。
截屏2022-03-23 10 16 38

IMG_2881

请问是否有办法解决?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.