中国大学mooc慕课刷课工具自动答题脚本

主要功能:

自动mooc考试测验客观题,开始刷课后自动看视频、看课件、自动讨论。


下载地址:下载后直接使用,已设置好了

https://www.lanzous.com/b01hhp7mf 


效果图:


核心代码:

import sys
if name == ‘main’:
sys.path.append(’…/’)
import re
import time
import random
import string
import requests
import rsa
import base64
import json
from urllib import parse
from pprint import pprint
from datetime import datetime
from Crypto.PublicKey import RSA
from src.Config import *
from src.Parse2Data import *
 
all = [
‘BrowseCourse’,
]
 
def encrypt(password):
pubkey = ‘-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5gsH+AA4XWONB5TDcUd+xCz7e\njOFHZKlcZDx+pF1i7Gsvi1vjyJoQhRtRSn950x498VUkx7rUxg1/ScBVfrRxQOZ8\nxFBye3pjAzfb22+RCuYApSVpJ3OO3KsEuKExftz9oFBv3ejxPlYc5yq7YiBO8XlT\nnQN0Sa4R4qhPO3I2MQIDAQAB\n-----END PUBLIC KEY-----’
rsa_key = RSA.importKey(pubkey)
crypt = rsa.encrypt(password.encode(), rsa_key)
ctypt_str = base64.b64encode(crypt).decode()
return ctypt_str
 
class BrowseCourse():
‘’’
类中类的一个示范
‘’’
class LoginCourse():
‘’’
通过手机号和邮箱登录慕课账号
‘’’
phone_imooc_url = ‘https://reg.icourse163.org/dl/yd/ini?pd=imooc&pkid=cjJVGQM&pkht=www.icourse163.org&channel=1’
email_imooc_url = ‘https://reg.icourse163.org/dl/ini?pd=imooc&pkid=cjJVGQM&pkht=www.icourse163.org&channel=0’
phone_tk_url = ‘https://reg.icourse163.org/dl/yd/gt’
email_tk_url = ‘https://reg.icourse163.org/dl/gt’
phone_sess_url = ‘https://reg.icourse163.org/dl/yd/lpwd’
email_sess_url = ‘https://reg.icourse163.org/dl/l’
phone_cookie_url = ‘https://www.icourse163.org/passport/logingate/changeCookie.htm?type=ursCellphone’
email_cookie_url = ‘https://www.icourse163.org/passport/logingate/changeCookie.htm?type=urs’
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符 “速评一下”
©️2020 CSDN 皮肤主题: 深蓝海洋 设计师:CSDN官方博客 返回首页