Git Product home page Git Product logo

qn-big-study's Introduction

江西青年大学习批量过后台

适用于2023新版青年大学习善德教育系统

GitHub issues GitHub stars GitHub forks GitHub license

不断更新中....

环境:

requests<br>
xlrd == 1.2.0 //最新版xlrd==2.0.1不支持xlsx文件的读取<br>
python3.6以上<br>

功能:

新设团委id查询

批量学习(不限制学校,班级,全自动化)

理论上江西省所有学校所有专业都适用,请自行测试

增加青年大学习学习截图功能,可供选择批量产生截图

添加docker在GitHub action 定时运行

accesstoken可以在记录后台获取,目前正在写批量获取脚本,目前先自行获取。

后台地址:http://106.225.141.143:8103 然后按F12可以找得到,也可以自行抓包获取,填入对应excel中即可

仅仅测试少量数据,若有问题,请发issue



更新记录

2022/05/20 发布青年大学习单人学习
2022/05/22 发布青年大学习多人学习版本
2022/05/23 更新青年大学习脚本(江西共青团服务器更新)
2022/09/26 关于xlrd模块版本说明
2022/09/27 打包版本发布(仅仅适用于windows系统)
2022/11/13 Cnlomou添加docker启动以及定时任务
2022/11/14 推出单个学习截图以及批量导出学习截图功能
2022/11/14 解决python版本对于xlrd不兼容问题
2022/12/20 解决无法获取最新一期青年大学习的问题
2023/07/02 解决增加accesstoken验证 请使用study_20230702.py 2023/07/10 增加多线程,加快处理速度!
2023/08/12 添加补学历史学习模块(复习模式)


GitHub action 定时运行使用说明

  • 1.fork仓库到自己的仓库
  • 2.下载仓库的名单.xls文件
  • 3.按照下面的使用说明填写相关内容在名单.xls文件中,保存并上传至你fork的仓库。 不会填写参数
  • 4.设置定时时间。 怎么设置时间参数?
  • 5.修改你fork 仓库内的QN-big-study/blob/main/.github/workflows/docker-image.yml内的文件(默认是每周3晚上9点多定时执行)
on:
   schedule:
    - cron: "20 13 * * 3"  #这里是每周3晚上9点多 
  • 6.接下来可以关闭你的电脑,每周都会根据你的时间设定自动学习默认是每周3晚上9点多定时执行()。

使用说明:

将整个项目 Fork到自己仓库/拉取到本地/下载到本地

pip3 install -r requirements.txt 安装依赖


step1:下载本仓库所有代码,运行QN_study.py程序,如下图所示

启动页面

一共有两个模块,其中需要查询班级的组织id进行配置,请输入`1`进入`青年大学习组织id查询`如下图

id查询页面

后方一串数字即为组织id,继续选择下去,直到班级。例如:N00130001******,记住他

step2:配置相关学习数据,打开名单.xlsx,填入相关信息

配置页面

把刚刚记住的填入组织代码处,若是三级组织需要填写班级,若是四级组织,班级空着即可,不需要填写。保存即可


tips:excel文件一定要与程序位于同一个目录下,否则会出错!!!

step3:再次打开程序,选择批量学习,即可完成学习!

学习页面

特别鸣谢


1、接决依赖缺少问题
2、添加定时任务
3、添加docker启动

↳ Stargazers

Stargazers repo roster for @ygxiuming/QN-big-study


↳ Forkers

Forkers repo roster for @ygxiuming/QN-big-study


程序打包资源

蓝奏云 https://wwd.lanzoum.com/b01pvee8j 密码:8888

有问题请发issue,看到会回复!

最后的最后,可以给我一个star吗?万分感谢!

qn-big-study's People

Contributors

ygxiuming avatar cnlomou avatar

Stargazers

 avatar 相约Dec23rd avatar 曹某 avatar XYZliang avatar  avatar  avatar skip avatar  avatar LasetX avatar CHEN DAOYU avatar  avatar 金羿ELS avatar VaporTang avatar  avatar Meng avatar 怀抱 avatar

Watchers

 avatar

qn-big-study's Issues

[ml-day-1]依赖xlrd版本未知

项目环境不完善,xlrd的版本未知,使用xlrd-2.01版运行结果如下

是否同意以上声明,同意(请输入1),不同意(请输入0) :1

 1.青年大学习组织id查询
 2.青年大学习开始学习

请输入选择模式序号:2
第22期青年大学习标题:2022年第21期
青年大学习学习链接:https://h5.cyol.com/special/daxuexi/dr9ja2jkc6/index.html
Traceback (most recent call last):
  File "E:\cache\QN-big-study-main\QN-big-study-main\QN_study.py", line 213, in <module>
    QNstudy()
  File "E:\cache\QN-big-study-main\QN-big-study-main\QN_study.py", line 172, in QNstudy
    data_excel = xlrd.open_workbook('名单.xlsx')
  File "C:\Users\0\AppData\Local\Programs\Python\Python39\lib\site-packages\xlrd\__init__.py", line 170, in open_workbook
    raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

希望作者提供xlrd的版本

在使用中途总是会提前结束

在使用中途总是会提前结束是什么原因,有时候可以正常完成到提示学习完成,有时候跑到一半突然就关闭了,查id也一样会闪退

这种错误有问题吗

0%| | 0/23 [00:00<?, ?it/s]───────────────────────────────────────────────────────────────────────────────
2023年第19期
NID: N0013000710181003
Name: 李天池
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connectionpool.py", line 537, in _make_request
response = conn.getresponse()
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 1374, in getresponse
response.begin()
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\http\client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\socket.py", line 705, in readinto
return self._sock.recv_into(b)
TimeoutError: timed out

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connectionpool.py", line 845, in urlopen
retries = retries.increment(
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\util\retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\util\util.py", line 39, in reraise
raise value
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connectionpool.py", line 791, in urlopen
response = self._make_request(
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connectionpool.py", line 539, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\urllib3\connectionpool.py", line 371, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='127.0.0.1', port=7890): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\study_20230812.py", line 333, in historystudy
userid, name, info = get_person_info(token)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\study_20230812.py", line 178, in get_person_info
response = requests.request("GET", url, headers=config.headers,timeout=5)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\venv\lib\site-packages\requests\adapters.py", line 532, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPConnectionPool(host='127.0.0.1', port=7890): Read timed out. (read timeout=5)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\logging_init_.py", line 1100, in emit
msg = self.format(record)
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\logging_init_.py", line 943, in format
return fmt.format(record)
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\logging_init_.py", line 678, in format
record.message = record.getMessage()
File "C:\Users\mihu\AppData\Local\Programs\Python\Python310\lib\logging_init_.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\study_20230812.py", line 410, in
historystudy(token, nid, name, id, tittle, subOrg, url,tittle_list)
File "C:\Users\mihu\Desktop\QN-big-study-main(3)\QN-big-study-main\study_20230812.py", line 341, in historystudy
logging.error("main 函数出现错误,错误为:", e)
Message: 'main 函数出现错误,错误为:'
Arguments: (ReadTimeout(ReadTimeoutError("HTTPConnectionPool(host='127.0.0.1', port=7890): Read timed out. (read timeout=5)")),)
4%|▍ | 1/23 [00:05<01:53, 5.16s/it]───────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────

h5的学习入口似乎用不了了

大佬能否重新测试更新一下,隔壁的项目有走小程序入口进去的,h5似乎系统更新以后无法用电脑学习了
QQ图片20240227122509

错误

大佬这个问题该怎么解决
屏幕截图 2023-10-27 095156

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.