Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from ElainaMoe:master #1

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion GetJudgerInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ def GetInfo(SESSDATA):
1: '具有资格',
2: '资格失效'
}
username='***'
parsed=str({
'用户名': info_loads['data']['uname'][0]+ ('*' * int(len(info_loads['data']['uname'])-2)) +info_loads['data']['uname'][len(info_loads['data']['uname'])-1:],
'用户名': username,
'已裁决案件数': info_loads['data']['caseTotal'],
'资格状态': status[info_loads['data']['status']],
'剩余资格天数': info_loads['data']['restDays'],
Expand Down
18 changes: 10 additions & 8 deletions Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ def Main():
print('获取到用户信息,具体如下:')
print(UserinfoParsed)
if(Userinfo['data']['status']==2):
print('检测到未具有风纪委员资格,正在尝试申请……')
global ApplyResult
ApplyResult,ApplyMsg=Apply(sessdata,csrf)
if(ApplyResult):
print('风纪委员资格申请成功,正在执行脚本操作……')
elif(not ApplyResult):
print('申请风纪委员资格失败,{},脚本即将退出!'.format(ApplyMsg))
sys.exit()
print('未具有风纪委员资格,正在退出……')
sys.exit()
# print('检测到未具有风纪委员资格,正在尝试申请……')
# global ApplyResult
# ApplyResult,ApplyMsg=Apply(sessdata,csrf)
# if(ApplyResult):
# print('风纪委员资格申请成功,正在执行脚本操作……')
# elif(not ApplyResult):
# print('申请风纪委员资格失败,{},脚本即将退出!'.format(ApplyMsg))
# sys.exit()
while True:
print('正在进行下一案件的获取……')
cid=GetNew(csrf,sessdata)
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# 风纪委员会自动投票

![bilibiliJudge](https://socialify.git.ci/ElainaMoe/bilibiliJudge/image?forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)

请注意:关于LICENSE,在Apache-2.0的基础上增加一条:**禁止上传到CSDN等网站盈利,禁止放在某宝某鱼等平台贩卖**,否则官方找上门就**删库跑路**!

因为B站风纪委员改革,本库将永久处于Archive状态,谢谢大家的陪伴。如需留言,请到GamerNoTitle的Discussion中留言,链接在下面一行。如果有技术交流,欢迎私信!

**本脚本从[@GamerNoTitle](https://github.com/GamerNoTitle)出Fork而来,源仓库已于2021.5.19删除(我也不知道为什么本仓库会成为源仓库,理论上应该所有人都是源仓库才对),具体请参照[关于得知Github查封Action仓库的信息后我自行删除脚本的这档事 #2](https://github.com/GamerNoTitle/GamerNoTitle/discussions/2)**

本脚本通过使用Github Action来实现B站风纪委员的自动投票功能,喜欢请给我点个STAR吧!

如果你不是风纪委员,在符合风纪委员申请条件的情况下,本脚本会自动帮你申请
~~如果你不是风纪委员,在符合风纪委员申请条件的情况下,本脚本会自动帮你申请~~ 不现在不会了╮(╯▽╰)╭

投票时间是早上八点,如果有需要请自行修改`.github/workflows/Judge.yml`中的时间,时间是UTC时区的时间,需要将时位+8才是北京时间

Expand Down Expand Up @@ -70,8 +76,6 @@

**请注意:不要把分号弄进去了!不要分号!不要分号!(重要的事情说三遍)**

![](https://upimage.alexhchu.com/2021/01/26/a892c4e380db5.png)

#### giveup与delay

这是两个我设定的值,因为B站对于案件有`放弃`这一说,所以我对它特别加了个开关
Expand Down
1 change: 1 addition & 0 deletions UUID.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
162bba5c-c96c-4390-a450-55ffa04638a6