forked from ranyong1997/sk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StartWork.py
51 lines (49 loc) · 1.66 KB
/
StartWork.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2022/4/23 9:58 AM
# @Author : ranyong
# @Site :
# @File : StartWork.py
# @Software: PyCharm
import csv
import common.initMooc as mooc_init
# ****************************************** 配置 ******************************************
for key, value in mooc_init.get_user_all().items():
# # 账号1(大号)
# username1 = key # 账号
# password1 = value # 密码
# # 账号2(小号)
# username2 = "" # 账号
# password2 = "" # 密码
# 账号1(大号)刷课
is_look_video = True
# 小号退出所有课程
is_withdraw_course = False
# 做作业
is_work_exam_type0 = True
# 做测验
is_work_exam_type1 = True
# 考试
is_work_exam_type2 = False
# 大于90分的不进行再次作答
is_work_score = 90
# 需要跳过的课程,填写方式例: ['大学语文', '高等数学']
is_continue_work = ['注射成型技术', '鞋服陈列设计']
# ****************************************** 结束 ******************************************
# if __name__ == '__main__':
mooc_init.run(
username1=key,
password1=value,
username2="",
password2="",
is_look_video=is_look_video,
is_withdraw_course=is_withdraw_course,
is_work_exam_type0=is_work_exam_type0,
is_work_exam_type1=is_work_exam_type1,
is_work_exam_type2=is_work_exam_type2,
is_work_score=is_work_score,
is_continue_work=is_continue_work
)
with open('data/success.csv', 'a+', newline='', encoding='gbk') as f:
writer = csv.writer(f)
writer.writerow([key, value, '已刷'])