tianzhengs / beijing_daxuexi_simple Goto Github PK
View Code? Open in Web Editor NEW北京 青年大学习 使用Github Actions自动完成
License: MIT License
北京 青年大学习 使用Github Actions自动完成
License: MIT License
你好,想请教下学习方法,我刚刚入门会使用基本语法,但感觉缺乏很多系统性知识 想请教下如何学习。比如说让自己的代码能在actions运行,pycharm生成requirements.txt等功能之前都不知道。看了你编程的大为震撼,请指教!
没有学习的账号会提示已经学习
Windows
本地安装onnxruntime
环境报错
希望可以去掉 onnxruntime
运行
根据github的有关规定,像这种利用action跑脚本的行为是违规的,有很多人的仓库都被封了,但似乎每两个月给你发邮件提醒的时候重新启动action可以避免被封。
所以想请问一下大佬,有没有兴趣做一个本地运行或者云函数的版本,这样可以避免未来发生问题
python -u "e:\Beijing_Daxuexi_Simple-main\main.py"
账号数量:1
--User 1--
登录成功
获取组织id-2
无法获取orgID
Traceback (most recent call last):
File "e:\Beijing_Daxuexi_Simple-main\main.py", line 66, in
if study(username, password, ua):
File "e:\Beijing_Daxuexi_Simple-main\study.py", line 101, in study
raise Exception('组织id不匹配,如果看到这个请开个issue说下')
Exception: 组织id不匹配,如果看到这个请开个issue说下
python -u "e:\Beijing_Daxuexi_Simple-main\main.py"
账号数量:1
--User 1--
登录成功
获取组织id-2
无法获取orgID
Traceback (most recent call last):
File "e:\Beijing_Daxuexi_Simple-main\main.py", line 66, in
if study(username, password, ua):
File "e:\Beijing_Daxuexi_Simple-main\study.py", line 101, in study
raise Exception('组织id不匹配,如果看到这个请开个issue说下')
Exception: 组织id不匹配,如果看到这个请开个issue说下
> 我这里还是不行
刚刚试了,显示Error: raise Exception('貌似自己这显示完成了,但实际上没有?建议自己检查下(尤其是有团支书账号可以看到情况的),然后可以在issue#31里反馈下') 团支书后台没有记录
我这里刚刚试过,还是没有显示,我在想是不是因为之前我点过那个速通链接,多点了很多导致留下了不少空白的完成记录。但现在速通链接已经寄了,所以即使后台看不到完成记录,但在这里还是检测为已完成,所以就没有速通?是不是要等到空白记录都填上,这个程序才能发挥作用?
新的期数应该可以,以前的应该是这个情况,如果不想手动解决可以把文件主体那块换成一个循环补下以前的
Originally posted by @startkkkkkk in #31 (comment)
小白请问您在这里说的“补下以前的”具体怎么操作呢,我试图直接修改study.py, 不再检查是否已经做过(直接注释Line80-82 QWQ我只是试试,不知道怎么改),然后就出现以下报错信息
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
docker中一人一个容器没问题
但一个容器多个账号就提示报错了
我试的格式是:配置账号:USERNAME=[('账号1', '密码1'),('账号2', '密码2'),('账号3', '密码3')]
请问应该如何修改呢?
--User 1--
� 登录成功
完成青年大学习:坚强核心(团员和青年主题教育特辑), 但未在检查中确认
--Summary--
成功:0,失败:1
Traceback (most recent call last):
File "main.py", line 73, in <module>
raise Exception(f'有{failed}个失败!')
Exception: 有1个失败!
python -u "e:\Beijing_Daxuexi_Simple-main\main.py"
账号数量:1
--User 1--
登录成功
获取组织id-2
无法获取orgID
Traceback (most recent call last):
File "e:\Beijing_Daxuexi_Simple-main\main.py", line 66, in
if study(username, password, ua):
File "e:\Beijing_Daxuexi_Simple-main\study.py", line 101, in study
raise Exception('组织id不匹配,如果看到这个请开个issue说下')
Exception: 组织id不匹配,如果看到这个请开个issue说下
actions/checkout@v2, aormsby/[email protected], and actions/setup-python@v1 are not allowed to be used in surreyskahn/Beijing_Daxuexi_Simple. Actions in this workflow must be: within a repository owned by surreyskahn.
运行后提示:完成青年大学习:**旗帜(团员和青年主题教育特辑), 但未在检查中确认
我之前是靠类似本仓库的方法,手动点击链接完成学习的,并在国庆期间预学习了本周内容。今天准备预学习下周内容,发现链接失效,然后找到了这个仓库。非常感谢作者为我们做的这些,但我发现了两个疑似无法修复的问题:
1、之前是可以预学习的,比如9月就可以把91期92期都学完;但是今天我把本仓库在本地跑了跑,发现无论如何都无法预学习未来的内容,总是会返回本期内容。
2、更重要的是,使用这类方法,我自己可以查到自己完成了学习,但团支书那边显示我没有。因为我自己之前就有了学习记录,所以无法复现这个问题。我怀疑这个方法已经失效了。
希望其他人尤其是团支书确认一下是否存在这些问题,及时补票,避免大家超过学习时限。
#24 为两小时前关闭的ISSUE,但是新运行的ACTION仍然报错。
6小时前,约10月10日8点自动运行失败,刚刚手动运行也失败
注意到Fork中的Code中最近更新在3小时以前(约12点)
我在微信青春山东公众号上进行青年大学习,自动使用微信登录,没有设置过账号和密码,我应该在哪里设置账户和密码?
大佬好,请问有时间可以写一个河北省使用的吗😋
更新后运行报错
想问一下大佬这个问题应该怎么解决?
Traceback (most recent call last):
账号数量:1
File "main.py", line 49, in
--User 1--
raise Exception(f'有{failed}个失败!')
登录成功
Exception: 有1个失败!
{'message': '请登录', 'code': 0}
Traceback (most recent call last):
File "/home/runner/work/Beijing_Daxuexi_Simple/Beijing_Daxuexi_Simple/study.py", line 43, in study
url = r['newCourse']['url']
KeyError: 'newCourse'
多用户下,除“在运行前已完成,退出”的User
外,均出现“服务器内部错误。”
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,target-densitydpi=high-dpi,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="robots" content="noarchive">
<meta name="csrf-param" content="_csrf_mobile">
<meta name="csrf-token" content="fDy1EivNA8MJ1q1W_fBRUhoAYNHmn6-1DFiODQm4Y9tLX_x2Qq8wjkex_zeXqGFrT2IhtJf0yNtvEed5ffoPqA==">
<title>错误 (#8)</title>
<link href="/css/css.css" rel="stylesheet">
<link href="/css/icons-extra.css" rel="stylesheet">
<script src="/js/mui.min.js"></script>
<script src="/js/mui.zoom.js"></script>
<script src="/js/mui.previewimage.js"></script>
<script src="/js/jquery.min.js"></script>
</head>
<body>
<div class="site-error">
<h1>错误 (#8)</h1>
<div class="alert alert-danger">
服务器内部错误。 </div>
<p>
The above error occurred while the Web server was processing your request.
</p>
<p>
Please contact us if you think this is a server error. Thank you.
</p>
</div>
<script type="text/javascript" charset="utf-8">//mui('.mui-scroll-wrapper').scroll({
// deceleration: 0.0005, //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006,
// scrollY: true, //是否竖向滚动
// scrollX: false, //是否横向滚动
// indicators: false, //是否显示滚动条
// // parallaxElement: "#refreshContainer1",
// // parallaxRatio: 0.4,
// // drag: function() {
// // alert("a");
// // }
//});
</script>
</body>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?f68c037bb28394495cc1502351e9cebd";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({id: "JWNuO3ul2n4LyYbV",ck: "JWNuO3ul2n4LyYbV"})</script> -->
Traceback (most recent call last):
File "/home/zephyr/Beijing_Daxuexi_Simple/study.py", line 22, in study
r'src="(/site/captcha.+)" alt=', touch.text)[0]
IndexError: list index out of range
请问有仍使用github的方案吗?毕竟比本地方便...
怎么改改代码
本周开始study.py
中的haveLearned = bjySession.get(learnedInfo).json()
运行报错,看起来像Json Decoder的问题,报错信息如下:
账号数量:2
--User 1--
登录成功
Traceback (most recent call last):
File "C:\Users\PathfinderZ\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\PathfinderZ\AppData\Local\Programs\Python\Python310\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\PathfinderZ\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\PathfinderZ\AppData\Local\Programs\Python\Python310\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\01.Code\Beijing_Daxuexi_Simple-main\main.py", line 70, in <module>
if study(username, password, ua):
File "D:\01.Code\Beijing_Daxuexi_Simple-main\study.py", line 62, in study
haveLearned = bjySession.get(learnedInfo).json()
File "C:\Users\PathfinderZ\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 2 column 1 (char 2)
--User 1--
Traceback (most recent call last):
File "C:\Users\LMY\Desktop\Daxuexi\study.py", line 25, in study
capText = cap_recognize(bjySession.get(url=capUrl).content)
File "C:\Users\LMY\Desktop\Daxuexi\utility.py", line 27, in cap_recognize
return DdddOcr().classification(denoise(cap))
File "C:\Users\LMY\Desktop\Daxuexi\utility.py", line 31, in denoise
img = Image.open(BytesIO(cap))
File "c:\Users\LMY\Desktop\Daxuexi\venv38\lib\site-packages\PIL\Image.py", line 3280, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x000001F6FFEA5F40>
Traceback (most recent call last):
File "C:\Users\LMY\Desktop\Daxuexi\study.py", line 21, in study
capUrl = "https://m.bjyouth.net" + re.findall(
IndexError: list index out of range
Login:识别的验证码错误
Traceback (most recent call last):
File "C:\Users\LMY\Desktop\Daxuexi\study.py", line 21, in study
capUrl = "https://m.bjyouth.net" + re.findall(
IndexError: list index out of range
登录成功
Traceback (most recent call last):
File "C:\Users\LMY\Desktop\Daxuexi\study.py", line 42, in study
r = json.loads(bjySession.get("https://m.bjyouth.net/dxx/index").text)
File "C:\Users\LMY\AppData\Local\Programs\Python\Python38\lib\json_init_.py", line 357, in loads
return _default_decoder.decode(s)
File "C:\Users\LMY\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\LMY\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
登入失败,退出
登录成功
获取组织id-2
无法获取orgID
Traceback (most recent call last):
File "D:\ShareCache\Office-PKU\团支书工作\Beijing_Daxuexi_Simple-main\main.py", line 51, in
if study(username, password, ua):
File "D:\ShareCache\Office-PKU\团支书工作\Beijing_Daxuexi_Simple-main\study.py", line 101, in study
raise Exception('组织id不匹配,如果看到这个请开个issue说下')
Exception: 组织id不匹配,如果看到这个请开个issue说下
大佬 现在还能用吗,求出个具体的教程
请问一下如果我想改成两天学习一次应该在哪个文件中更改呢?
在Actions中的Job部分:
在显示User1登录成功后便开始报错。具体的Python报错是在request中的get报错
在Summary中的Annotation中显示为build报错:
Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: actions/checkout, aormsby/Fork-Sync-With-Upstream-action, actions/setup-python, actions/checkout
因为之前就已经Fork+Star了,并且在自己的Action中运行成功多次了,突然报错有点不知所措,不知道是什么问题。
rt,在.py文件中似乎没有看到相关设置
你好,测试登陆青春北京时,用户名和密码可以自动填写,验证码却不能,导致手动action时报错失败。想问一下问题出在哪里。谢谢
请忽略
按要求多个账号提示未加入secret,secret改为只用单个账号能登录但是爆出服务器内部错误,请问该咋办呀
Traceback (most recent call last):
File "D:\python\py\lib\site-packages\requests\models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "D:\python\py\lib\json_init_.py", line 348, in loads
return _default_decoder.decode(s)
File "D:\python\py\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "D:\python\py\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 2)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\python\Beijing_Daxuexi_Simple-main\main.py", line 43, in
if study(username, password, ua):
File "D:\python\Beijing_Daxuexi_Simple-main\study.py", line 62, in study
haveLearned = bjySession.get(learnedInfo).json()
File "D:\python\py\lib\site-packages\requests\models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 2 column 1 (char 2)
账号数量:1
--User 1--
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='m.bjyouth.net', port=443): Max retries exceeded with url: /site/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa144955d90>: Failed to establish a new connection: [Errno 110] Connection timed out'))
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='m.bjyouth.net', port=443): Max retries exceeded with url: /site/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa1446cf090>: Failed to establish a new connection: [Errno 110] Connection timed out'))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.