Code Monkey home page Code Monkey logo

dailycp's Introduction

DailyCP

简介

今日校园自动打卡脚本。

  • 本项目是FKDailyCP的旧版官改版,无需添加formdb,已同步近期更新,若无法使用,请移步Finch/FKDailyCP
  • 目前毕业了没办法测试各种问题

使用说明

pip3 install -U -r requirements.txt
python3 DailyCP.py <学校前缀> <账号> <密码> <定位地址>

提示No module named 'setuptools'时请先手动运行pip3 install setuptools
学校前缀可以在这里自行查询

用栗

python3 DailyCP.py sise 1640915111 password **广东省佛山市禅城区福贤路

自动签到

计划任务

请注意系统时间是否设置正确
可以使用crontab -e设置定时任务0 9 * * * /usr/bin/python3 <学校前缀> <账号> <密码> <定位地址>

用栗
0 9 * * * /usr/bin/python3 /home/pi/DailyCP/DailyCP.py sise 1640915111 password **广东省佛山市禅城区福贤路

GitHub ACTIONS 自动签到

---(已移除ACTION方式,据说 GitHub 官方不允许使用 Action 做签到或者续期类应用,否则会封禁项目甚至封号,需要Action自己翻记录)---

Fork本项目,在你的仓库下点击Settings,增加SCHOOL_NAMEACCOUNTPASSWORDADDRESS 4个Secrets,分别对应上述的<学校前缀> <账号> <密码> <定位地址>,之后打开你仓库的ACTIONS,最后手动提交一次代码修改就能激活自动签到了。
Secrets

签到方式:
手动签到
  • push
  • 自己给自己star
自动签到
  • 每3小时自动签到一次

Credits

dailycp's People

Contributors

uzkis avatar

Stargazers

unheading avatar  avatar  avatar Fan Chun Yang avatar  avatar ilkeiii avatar  avatar  avatar Exqlnet avatar  avatar hahaha avatar  avatar  avatar  avatar  avatar  avatar nonplaybox avatar  avatar TianYu avatar  avatar 人称昊哥 avatar  avatar Pr0pHesyer avatar slow avatar wujimaka avatar  avatar 成王败冦 avatar  avatar  avatar HW Jia avatar yuan avatar Avery avatar  avatar 阿怪 avatar Gavin avatar Andy avatar Luke Minaya avatar Jayson Yang avatar  avatar  avatar Cybertum avatar leslie.github.io avatar ice avatar  avatar  avatar  avatar  avatar wangdesun avatar  avatar  avatar  avatar  avatar  avatar  avatar Optics avatar  avatar Starcow avatar  avatar  avatar  avatar  avatar 越行勤 avatar HLH avatar  avatar  avatar Little White Dog avatar CALLMEROCKET avatar  avatar TatRat avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar RinggaV avatar  avatar  avatar

dailycp's Issues

getCollectorDetail方法中获取的ret有问题

报错log:
PS C:\Other\SoftWare\MySoftWare\DailyCP-master> python3 DailyCP.py xxx xxxx xxxx xxxx Login succeeded. [{'wid': '21391', 'instanceWid': 8883, 'formWid': '9028', 'priority': '5', 'subject': '2022级新生来校报到健康打卡', 'content': 'https://wecres.cpdaily.com/counselor/1020258402117903/html/9c42c5107a064797b6f28b06105a635e.html', 'senderUserName': '赵亚宾(材料与冶金学院)', 'createTime': '2022-09-08 00:21', 'startTime': '2022-09-08 00:01', 'endTime': '2022-09-08 23:59', 'currentTime': '2022-09-08 13:41:56', 'isHandled': 0, 'isRead': 0}] {"code":"2210060000","message":"循环普通任务实例wid为空","datas":null} Traceback (most recent call last): File "C:\Other\SoftWare\MySoftWare\DailyCP-master\DailyCP.py", line 239, in <module> main(sys.argv[1:]) File "C:\Other\SoftWare\MySoftWare\DailyCP-master\DailyCP.py", line 236, in main app.autoComplete(address) File "C:\Other\SoftWare\MySoftWare\DailyCP-master\DailyCP.py", line 176, in autoComplete detail = self.getCollectorDetail(item["wid"]) File "C:\Other\SoftWare\MySoftWare\DailyCP-master\DailyCP.py", line 124, in getCollectorDetail url = ret["form"]["formContent"] TypeError: 'NoneType' object is not subscriptable

修改以用于输出ret.text的代码
def getCollectorDetail(self, collectorWid): url = "https://{host}/wec-counselor-collector-apps/stu/collector/detailCollector".format(host=self.host) body = { "collectorWid": collectorWid } self.session.headers["Content-Type"] = "application/json" ret = self.session.post(url, data=json.dumps(body)) print(ret.text) ret = json.loads(ret.text)["datas"] url = ret["form"]["formContent"] return ret

感谢感谢

今日校园升级版本后,由原来的XCE927==密钥更换成了ST83=@xv,手上刚好也没有测试环境,模拟器又运行不了

老哥 执行任务后报错

账号我填的是学号 这个有影响吗
Traceback (most recent call last):
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request
self._validate_conn(conn)
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
conn.connect()
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connection.py", line 308, in connect
conn = self._new_conn()
File "/home/runner/.local/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7feef977f780>: Failed to establish a new connection: [Errno -2] Name or service not known

验证码result code:FAIL_UPNOTMATCH

您好,我在测试您的代码的时候发现反复登陆不了,检查发现字段needCaptcha为true,所以将您注释部分获取验证码的部分取消掉,手动输入验证码后 result code字段由原来的 NOTMATCH 变成了 FAIL_UPNOTMATCH
因为本人对网络部分不是很熟悉,想请教以下怎么处理

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.