分享一款中国大学慕课MOOC免费答题软件剧本_刷课

代学网课.png

本站代学继续教育、专业技术人员在线、各类网上学习任务。
我们是专业代学拥有多年学习经验,安全快速高效。
100%包过,欢迎联系:QQ:323436634,微信:Shuake666888

中国大学.webp

代学须知:

我们是专业的教师继续教育学习代学团队,主要从事幼儿,中小学教师继续教育学习,国培计划学习,网络研修学习等教师网上学习任务。

每个城市的教师学习不完全相同,大部分都是看视频+做作业,还有微课或者专业项目。

问:多长时间完成

答:正常情况下,学习内容都已经开放的话一周左右完成.没开放的等开放后第一时间完成。

问:能考多少分数,

答:保证合格60分以上,项目一般要求合格即可,我们也会尽可能的给您多提高分数。正常都是80分以上。

全国所有城市的教师学习都可以做

客服QQ:323436634  微信:Shuake666888

联系我们:

继续教育联系QQ.png


分享一款中国大学慕课MOOC免费答题软件剧本,亲测好用,解放了我的双手

分享一款中国大学慕课MOOC免费答题软件剧本_刷课插图2

下面是谜底源码剧本内容分享:迎接大佬门指正

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 = ‘中国大学MOOC(慕课)_国家精品课程在线学习平台

email_cookie_url = ‘中国大学MOOC(慕课)_国家精品课程在线学习平台

def __init__(self, username, password, parent=None):

self.init()

self.parent = parent if parent else BrowseCourse.Parent()

self.username = username

self.password = encrypt(password)

def init(self):

self.headers = {

‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36’,

‘cookie’: ‘JSESSIONID-WYTXZDL=rDrJqTRndbJHlxQFUo%2F3yHZpRq5Nj1ycAPPDnajKPn0%2BDm8iVnbzIS%2BZz9Zvn63tXf8dTTQfPfONqgQeaMdWKFjvuZYFI81nSNGMKhhxUr2SLtywJZXBYRiqF3vHGP9Wx%2BjfJKctSnZeH3ykd0hSZt%2BRNr6umB%2BhJkjlphSlgKgB90w6%3A1567604303120’,

}

self.tk_params = {

‘un’: None, #username,

‘pd’: ‘imooc’,

‘pkid’: ‘cjJVGQM’,

}

self.sess_data = {

“un”: None, #username,

“pw”: None, #encrypt(password),

“pd”: “imooc”,

“pkid”: “cjJVGQM”,

“tk”: None, #tk,

}

def set_phone_imooc(self):

try:

res = request_get(self.phone_imooc_url, headers=self.headers)

cookie_dict = dict(res.cookies)

imooc_value = cookie_dict.get(‘l_yd_s_imooccjJVGQM’)

if imooc_value:

self.headers[‘cookie’] += ‘;l_yd_s_imooccjJVGQM=’+imooc_value

except RequestError:

pass

def set_email_imooc(self):

try:

res = request_get(self.email_imooc_url, headers=self.headers)

cookie_dict = dict(res.cookies)

imooc_value = cookie_dict.get(‘l_s_imooccjJVGQM’)

if imooc_value:

self.headers[‘cookie’] += ‘;l_s_imooccjJVGQM=’+imooc_value

except RequestError:

pass

def init_login(self):

self.headers = {

‘user-agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36’,

‘cookie’: ‘JSESSIONID-WYTXZDL=rDrJqTRndbJHlxQFUo%2F3yHZpRq5Nj1ycAPPDnajKPn0%2BDm8iVnbzIS%2BZz9Zvn63tXf8dTTQfPfONqgQeaMdWKFjvuZYFI81nSNGMKhhxUr2SLtywJZXBYRiqF3vHGP9Wx%2BjfJKctSnZeH3ykd0hSZt%2BRNr6umB%2BhJkjlphSlgKgB90w6%3A1567604303120’,

}

self.headers[‘user-agent’] += ‘–‘+ ”.join(random.sample(string.ascii_letters+string.digits, 32))

self.set_phone_imooc()

self.set_email_imooc()

def get_tk(self, tk_url):

try:

self.tk_params[‘un’] = self.username

res = request_get(tk_url, params=self.tk_params, headers=self.headers).json()

# print(res)

if self.parent.stop:

return None

return res.get(‘tk’)

except RequestError:

return None

def get_sess(self, sess_url, tk):

try:

self.sess_data[‘un’] = self.username

self.sess_data[‘pw’] = self.password

self.sess_data[‘tk’] = tk

res = request_post(sess_url, json=self.sess_data, headers=self.headers)

# print(res.text)

if self.parent.stop:

return None

cookies_dict = requests.utils.dict_from_cookiejar(res.cookies)

# print(cookies_dict)

if sess_url==self.phone_sess_url:

if cookies_dict.get(‘NTES_YD_SESS’):

cookie = ‘NTES_YD_SESS=’+cookies_dict.get(‘NTES_YD_SESS’)

return cookie

elif sess_url==self.email_sess_url:

if cookies_dict.get(‘NTES_SESS’):

cookie = ‘NTES_SESS=’+cookies_dict.get(‘NTES_SESS’)

return cookie

return None

except RequestError:

return None

def get_cookie(self, cookie_url, sess):

try:

headers = self.headers.copy()

headers[‘cookie’] = sess

res = request_get(cookie_url, headers=headers)

if self.parent.stop:

return None

cookies_dict = requests.utils.dict_from_cookiejar(res.cookies)

# print(cookies_dict)

if cookies_dict.get(‘STUDY_SESS’):

cookie = ‘STUDY_SESS=’+cookies_dict.get(‘STUDY_SESS’)

return cookie

return None

except RequestError:

return None

def login_by_phone(self):

tk = self.get_tk(self.phone_tk_url)

if not self.parent.stop and tk:

sess = self.get_sess(self.phone_sess_url, tk)

if not self.parent.stop and sess:

cookie = self.get_cookie(self.phone_cookie_url, sess)

if not self.parent.stop and cookie:

Config_Cookies.setCookie(self.username, cookie)

return True

return False

def login_by_email(self):

tk = self.get_tk(self.email_tk_url)

if not self.parent.stop and tk:

sess = self.get_sess(self.email_sess_url, tk)

if not self.parent.stop and sess:

cookie = self.get_cookie(self.email_cookie_url, sess)

if not self.parent.stop and cookie:

Config_Cookies.setCookie(self.username, cookie)

return True

return False

def login(self):

isLogin = False

self.init_login()

try:

isLogin = self.login_by_phone()

if not self.parent.stop and not isLogin:

isLogin = self.login_by_email()

except RequestError:

pass

return isLogin

class Parent():

stop = False

本站资源来自互联网收集,仅供用于学习和交流,如有侵权等不妥之处,请联系站长删除。
继续教育代学代看代刷网 » 分享一款中国大学慕课MOOC免费答题软件剧本_刷课

提供最优质的网上学习任务集合

立即查看 了解详情