欢迎访问!

Office学习网

您现在的位置是:主页 > 网络技术

网络技术

智慧职教MOOC学院

发布时间:2026-09-22网络技术评论
只适用 https://mooc.icve.com.cn/ 2022/03/16 已更新至Github 100分【考试+测验+作业+刷课】:https://github.com/11273/mooc-work-answer20

{'Id': 'qotwaxasvrbgva1hlhnjuw', 'ModuleType': 1。

{'id': 'q4twaxasv7zer5q5cks8gg'。

headers=headers)with open(moocCode.jpg, 'isUnlock': True}, 'PageCount': 8, 'courseOpenId': 'wylwaxasdyjptaswj67x6g', courseOpenId=n['courseOpenId'], wb。

'sortOrder': 3, 'cellContent': 'doc/g@66FFBBA9CB37B03D4245418690E54815.swf','topicId': topicId}result = json.loads(requests.post(url=url, 'cellType': 1, password):cookies = login(name=name, 'name': '1.茶艺服务礼仪训练'。

cookies=cookies).text)return result['list']# 2.得到一级目录--------[url=https://mooc.icve.com.cn/study/learn/getProcessList?courseOpenId=wylwaxasdyjptaswj67x6g]https://mooc.icve.com.cn/study/learn/getProcessList?courseOpenId=wylwaxasdyjptaswj67x6g[/url]def getProcessList(cookies。

data=data, 'name': '4.茶叶认识', data={'courseOpenId': courseId}。

'isUnlock': True}]'''url = https://mooc.icve.com.cn/study/learn/getCellByTopicIddata = {'courseOpenId': courseId, 'isUnlock': True}。

'isUnlock': True}。

'DateModified': '/Date(-62135596800000)/', courseId, 'resourceUrl': 'doc/g@66FFBBA9CB37B03D4245418690E54815.swf', 'isStudyFinish': True。

cookies=cookies).text)return result['topicList']# 4.获得三级目录(详细信息)---------[url=https://mooc.icve.com.cn/study/learn/getCellByTopicId?courseOpenId=wylwaxasdyjptaswj67x6gtopicId=qotwaxasyjbjd0mnjgxz1w]https://mooc.icve.com.cn/study/learn/getCellByTopicId?courseOpenId=wylwaxasdyjptaswj67x6gtopicId=qotwaxasyjbjd0mnjgxz1w[/url]def getCellByTopicId(cookies, 'DateCreated': '/Date(1603976559000)/', 'isLastStudy': False, 'resId': '', 'isUnlock': True}]for j in moduleList1:time.sleep(0.25)print(\t + j['name'])# 二级目录moduleList2 = getTopicByModuleId(cookies=cookies, 'name': '2.茶具的认识与使用',videoTimeTotalLong=info['VideoTimeLong'])if isOK['code'] == 1 and isOK['isStudy'] is True:print(\t\t\t\t + n['cellName'] + \t类型: + n['categoryName'] + \t\t-----刷课OK----)else:print(\t\t\t\t + n['cellName'] + \t类型: + n['categoryName'] + \t\t-----ERROR----)if __name__ == '__main__':# ====================== # 只需要填写name = 账号# 账号password = 密码 # 密码# ====================== # 然后运行, 'cellType': 1, {'id': 'ritwaxashqlasilv5ziiew', 'percent': 0, 'isAllowDownLoad': False, 'cellContent': 'doc/g@AA759F5E1EE1978FD760C403B17EF08C.mp4',videoTimeTotalLong=info['VideoTimeLong'])if isOK['code'] == 1 and isOK['isStudy'] is True:print(\t\t\t\t + m['cellName'] + \t类型: + m['categoryName'] + \t\t-----刷课OK----)else:print(\t\t\t\t + m['cellName'] + \t类型: + m['categoryName'] + \t\t-----ERROR----)else:# =================================================================================================================================for n in m['childNodeList']:time.sleep(0.5)# 如果课程完成-不刷课if n['isStudyFinish'] is True:print(\t\t\t\t + n['cellName'] + \t类型: + n['categoryName'] + \t\t------课程完成, 'FromId': None, 'ztWay': 0, 'ResId': '',courseOpenId=info['CourseOpenId'], 'TableName': 'MOOC_CourseProcessCell'}'''time.sleep(1)url = https://mooc.icve.com.cn/study/learn/viewDirectorydata = {'courseOpenId': courseOpenId, 'parentId': 'qotwaxasfj5jphzi8yiooq'。

'ResId': ''。

password):'''登录:param name: 用户名:param password: 密码:return: cookies'''# 验证码[url=https://mooc.icve.com.cn/portal/LoginMooc/getVerifyCode?ts=1608968080542]https://mooc.icve.com.cn/portal/LoginMooc/getVerifyCode?ts=1608968080542[/url]codeUrl = https://mooc.icve.com.cn/portal/LoginMooc/getVerifyCode?ts={}.format(int(round(time.time() * 1000)))loginUrl = https://mooc.icve.com.cn/portal/LoginMooc/loginSystemcodeResult = requests.post(url=codeUrl, 'ResId': '', 'childNodeList': [{'Id': 'qotwaxasp4vae7z3zcwqua', 'upCellId': '0',cellId=info['Id']。

cellId=info['Id'], 'sortOrder': 1,'password': password, 'resourceUrl': '', 'percent': 0, headers=headers, cellId):'''拿到学习时长等信息:param cookies: cookies:param courseOpenId: courseOpenId:param cellId: cellId:return: {'Id': 'cbwagosnyjooghaevg6fw'。

) as f:f.write(codeResult.content)# 验证码的cookiescode_cookies = codeResult.cookiesprint(----------验证码获取完成,}# [url=https://mooc.icve.com.cn/portal/LoginMooc/loginSystem?userName=LH17001password=qwer%40123verifycode=2405]https://mooc.icve.com.cn/portal/LoginMooc/loginSystem?userName=LH17001password=qwer%40123verifycode=2405[/url]# [url=https://mooc.icve.com.cn/portal/course/getCourseOpenList]https://mooc.icve.com.cn/portal/course/getCourseOpenList[/url]# [url=https://mooc.icve.com.cn/study/learn/getProcessList?courseOpenId=wylwaxasdyjptaswj67x6g]https://mooc.icve.com.cn/study/learn/getProcessList?courseOpenId=wylwaxasdyjptaswj67x6g[/url]# [url=https://mooc.icve.com.cn/study/learn/getCellByTopicId]https://mooc.icve.com.cn/study/learn/getCellByTopicId[/url]# [url=https://mooc.icve.com.cn/study/learn/viewDirectory]https://mooc.icve.com.cn/study/learn/viewDirectory[/url]# 0.登录, 'ModuleType': 1, 'ModuleType': 1, 'ResId': '', 'cellContent': '', 'courseOpenId': 'wylwaxasdyjptaswj67x6g'。

data=data, 'externalLinkUrl': '', 'percent': 0, 'name': '4.茶叶认识', 'name': '各种行茶礼仪', 'isGJS': 1。

'cellContent': '', 'parentId': 'pytwaxasupbiajdwbddwaw', 'isStudyFinish': True, 'sortOrder': 1, videoTimeTotalLong):'''开始刷课:param cookies: cookies:param courseOpenId: courseOpenId:param cellId: cellId:param videoTimeTotalLong: videoTimeTotalLong:return: {code:1, {'id': 'q4twaxastoradnurwvdxq', {'id': 'q4twaxasv7zer5q5cks8gg', headers=headers, 'ResId': '', 'externalLinkUrl': '', 'ModuleType': 1, 'categoryName': '作业', cookies=cookies)result = json.loads(result.text)return result['courseCell']# 6.开始刷课---------[url=https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLong?courseOpenId=wylwaxasdyjptaswj67x6gcellId=qotwaxastizp0ktzqcnjgauvideoLength=487videoTimeTotalLong=487]https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLong?courseOpenId=wylwaxasdyjptaswj67x6gcellId=qotwaxastizp0ktzqcnjgauvideoLength=487videoTimeTotalLong=487[/url]def statStuProcessCellLogAndTimeLong(cookies, 'DocSize': 9023286, 'ResId': '', courseOpenId=info['CourseOpenId'], 'percent': 0。

'isStudyFinish': False, 'resourceUrl': '', 'cellContent': '', 'externalLinkUrl': '', 'isAllowDownLoad': False。

'name': '3.泡茶操作规范',isStudy:true}'''time.sleep(1.5)url = https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLongdata = {'courseOpenId': courseOpenId, 'NewSortOrder': 0, 'upCellId': 'qotwaxasp4vae7z3zcwqua', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'studyStatus': 0}, 'ResId': '', 'sortOrder': 0, 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'cellName': '茶艺服务人员的仪态要求', 'cellType': 6。

'percent': 0, 'upCellId': 'qotwaxasy4hpjggnawg'。

'isStudyFinish': False, courseOpenId, 'parentId': 'qotwaxasfj5jphzi8yiooq'。

'isUnlock': True}, 'cellName': '2.茶艺服务人员的仪态要求', 'isUnlock': True}。

'cellId': cellId}result = requests.post(url=url, 'TopicId': 'qc6vagosurpneukvl1nh1w', {'id': 'q4twaxastoradnurwvdxq', 'ResId': '', 'GreenScanScene': ''。

'cellContent': 'doc/g@55633CAC7D22C7247E99B7D650010E7D.swf', 'categoryName': '作业', 'name': '2.茶具的认识与使用', 'isStudyFinish': False,'moduleId': moduleId}result = json.loads(requests.post(url=url, 'courseOpenId': 'wylwaxasdyjptaswj67x6g'。

'externalLinkUrl': '', 'FromType': 2, cellId。

'cellType': 6, password=password) , 'categoryName': '视频', 'CategoryName': 'ppt文档', 'ResId': '', {'id': 'qotwaxasyjbjd0mnjgxz1w', 'resId': '3ixwaxasg5ba3ri5avr79a', 'isUnlock': True}, 'isUnlock': True}, data=data, 'isGJS': 1。

'isAllowDownLoad': False, 'KnowledgeIds': '', 'RarJsonData': None, headers=headers, moduleId):'''得到二级目录:param cookies: cookies:param courseId: courseOpenId:param moduleId: moduleId:return: [{'id': 'pytwaxasupbiajdwbddwaw', 'parentId': 'qotwaxasfj5jphzi8yiooq'。

'isUnlock': True}, 'resId': '', courseId, 'isAllowDownLoad': False, 'cellType': 4, 'KnowledgeTitle': '', 'ModuleType': 1, cookies=cookies).text)return result['proces']['moduleList']# 3.得到二级目录--------[url=https://mooc.icve.com.cn/study/learn/getTopicByModuleId?courseOpenId=wylwaxasdyjptaswj67x6gmoduleId=q4twaxasc7nbpxt8pmkjdw]https://mooc.icve.com.cn/study/learn/getTopicByModuleId?courseOpenId=wylwaxasdyjptaswj67x6gmoduleId=q4twaxasc7nbpxt8pmkjdw[/url]def getTopicByModuleId(cookies, {'id': 'qotwaxasf7tahcyr6kd8wa'。

'VideoTimeLong': 0, 'isGJS': 1, 'sortOrder': 6, 'DocId': 'cbwagosz7nmuxz8cxclg', 'percent': 0。

topicId):'''获得三级目录(详细信息):param cookies: cookies:param courseId: courseOpenId:param topicId: topicId:return: [{'Id': 'qytwaxaso6hhfh3x0dnbw', 'isUnlock': True}。

courseId=i['id'], 'categoryName': 'swf', 'upCellId': '-1', 'resourceUrl': '', 'parentId': 'pytwaxasupbiajdwbddwaw', 'ModuleType': 1, 'name': '3.泡茶操作规范', 'ModuleType': 1, courseId=i['id']。

'isStudyFinish': True, 'ResId': ''。

'parentId': 'qytwaxaso6hhfh3x0dnbw', 'isUnlock': True}], 'upTopicId': '0', 'sortOrder': 2, 'CourseOpenId': 'gtjkawksy5jf7raso8gdq'。

'ModuleType': 1。

'isUnlock': True}。

{'Id': 'qotwaxasfj5jphzi8yiooq', 'ExternalLinkUrl': None, 'sortOrder': 2, data=data,'cellId': cellId。

'isUnlock': True}]'''url = https://mooc.icve.com.cn/study/learn/getProcessListresult = json.loads(requests.post(url=url, courseOpenId, 'sortOrder': 5, 'upCellId': 'qotwaxasvrbgva1hlhnjuw', topicId=k['id'])for m in moduleList3:time.sleep(0.25)print(\t\t\t + m['cellName'])# 如果只有三级目录if not len(m['childNodeList']):# =================================================================================================================================# 如果课程完成-不刷课if m['isStudyFinish'] is True:print(\t\t\t\t + m['cellName'] + \t类型: + m['categoryName'] + \t\t------课程完成。

like Gecko) Chrome/87.0.4280.88 Safari/537.36', 'name': '6.茶文化解读',videoTimeTotalLong=0)# 四级目录(最终)else:# 是视频或者音频isOK = statStuProcessCellLogAndTimeLong(cookies=cookies, 'ImpProjectId': '', 'percent': 0。

'cellName': '茶艺师的仪态', 'courseOpenId': 'wylwaxasdyjptaswj67x6g',text:茶艺与茶文化_第四次开课}]'''url = https://mooc.icve.com.cn/portal/course/getCourseOpenListresult = json.loads(requests.post(url=url, courseId=i['id']) # [{'id': 'oitwaxas05rp25uktqp8a', 'resId': ''。

'isUnlock': True}, 'isUnlock': True},videoTimeTotalLong=0)else:# 是视频或者音频isOK = statStuProcessCellLogAndTimeLong(cookies=cookies, 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'CellName': '幼儿照护员的职业素养', 'upTopicId': 'pytwaxasupbiajdwbddwaw', 'cellName': '茶艺师的仪容仪表要求', 'parentId': 'qytwaxaso6hhfh3x0dnbw', [Python] 纯文本查看 复制代码 # -*- coding: utf-8 -*-# [url=home.php?mod=spaceuid=238618]@Time[/url] : 2020/12/26 15:17# [url=home.php?mod=spaceuid=686208]@AuThor[/url] : Melon# [url=home.php?mod=spaceuid=406162]@site[/url] : # [url=home.php?mod=spaceuid=267492]@file[/url] : mooc.py# @Software: PyCharmimport timeimport requestsimport jsonfrom PIL import Imageheaders = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, headers=headers, 'name': '6.茶文化解读',然后输入验证码start(name=name。

courseId):'''得到一级目录:param cookies: cookies:param courseId: gtjkawksy5jf7raso8gdq:return: [{'id': 'oitwaxas05rp25uktqp8a', 'studyStatus': 0}]'''url = https://mooc.icve.com.cn/study/learn/getTopicByModuleIddata = {'courseOpenId': courseId, 'isGJS': 1, 'ImpDocId': '',请输入)data = {'userName': name, 'ParentId': 'qc6vagosly1owrpgpu6rg', 'isAllowDownLoad': False, 'categoryName': 'swf',拿到id--------[url=https://mooc.icve.com.cn/portal/course/getCourseOpenList]https://mooc.icve.com.cn/portal/course/getCourseOpenList[/url]def getCourseOpenList(cookies):'''获取所有课程:param cookies: cookies:return: [{id:wylwaxasdyjptaswj67x6g, 'ImpDocTitle': '', 'PlayType': 0, {'id': 'q4twaxasc7nbpxt8pmkjdw', 'cellName': '茶艺服务人员的仪容仪表要求', 'CellType': 1, {'id': 'ritwaxashqlasilv5ziiew', 'CellContent': None,'auvideoLength': videoTimeTotalLong, 'childNodeList': [{'Id': 'qotwaxasf5fm1vtfllslya'。

'verifycode': input(输入验证码:)}result = requests.post(url=loginUrl, 'ResId': '', 'isUnlock': True}, 'name': '5.泡茶规范与技术', 'cellType': 1, {'id': 'qotwaxasf7tahcyr6kd8wa', 'isGJS': 1, headers=headers, 'isAllowDownLoad': False,拿到cookie------[url=https://mooc.icve.com.cn/portal/LoginMooc/loginSystem]https://mooc.icve.com.cn/portal/LoginMooc/loginSystem[/url]def login(name, headers=headers, 'externalLinkUrl': '', 'isStudyFinish': False。

'upCellId': '-1',courseOpenId=info['CourseOpenId'], 'isGJS': 1, 'cellContent': 'doc/g@F35D826F1BAAA3B655096B7E19435948.mp4', 'resId': ''。

'parentId': 'qytwaxaso6hhfh3x0dnbw', 'resId': '', cellId=m['Id'])# 将信息拿去刷课if not m['categoryName'] == 视频 and not m['categoryName'] == 音频:# 如果不是视频或者音频isOK = statStuProcessCellLogAndTimeLong(cookies=cookies, 'percent': 40, 'ModuleType': 1, 'categoryName': '子节点', 'percent': 0, 'isUnlock': True}。

{'id': 'q4twaxasc7nbpxt8pmkjdw', 'externalLinkUrl': '', 'resId': '', 'sortOrder': 1, 'SpaceCount': 0, 'sortOrder': 1, 'cellName': '1.茶艺服务人员的妆容仪表要求'。

'isAllowDownLoad': False。

'ModuleType': 1, 'isAllowDownLoad': False, 'sortOrder': 3, 'ResId': '', {'Id': 'qotwaxasy4hpjggnawg', 'FromMOOCCellId': '', cookies=cookies).text)return resultdef start(name, 'ModuleType': 1,cellId=info['Id'], 'resourceUrl': '', {'Id': 'qotwaxasvrbejkntkxphtw'。

cellId=n['Id'])# 将信息拿去刷课if not n['categoryName'] == 视频 and not n['categoryName'] == 音频:# 如果不是视频或者音频isOK = statStuProcessCellLogAndTimeLong(cookies=cookies,'videoTimeTotalLong': videoTimeTotalLong}result = json.loads(requests.post(url=url, 'categoryName': '子节点', 'resId': '3ixwaxasu41ocvxkwprlxa'。

'isGJS': 1,不刷课-------)continue# 拿课程信息info = viewDirectory(cookies=cookies, 'name': '茶艺服务人员的仪容仪态', 'VideoQuestionCount': 0, 'IsAllowDownLoad': False, 'ResId': '', 'cellContent': '', 'sortOrder': 4, courseOpenId=info['CourseOpenId'], moduleId=j['id'])for k in moduleList2:time.sleep(0.25)print(\t\t + k['name'])# 三级目录moduleList3 = getCellByTopicId(cookies=cookies,不刷课-------)continue# 拿课程信息info = viewDirectory(cookies=cookies。

'topicId': 'pytwaxasupbiajdwbddwaw', 'SortOrder': 1, 'isUnlock': True}], data=data, 'upCellId': 'qotwaxasvrbejkntkxphtw', cookies=cookies).text)return result['cellList']# 5.拿到学习时长等信息----------[url=https://mooc.icve.com.cn/study/learn/viewDirectory?courseOpenId=wylwaxasdyjptaswj67x6gcellId=qotwaxastizp0ktzqcnjg]https://mooc.icve.com.cn/study/learn/viewDirectory?courseOpenId=wylwaxasdyjptaswj67x6gcellId=qotwaxastizp0ktzqcnjg[/url]def viewDirectory(cookies, headers=headers, 'isUnlock': True}, 'cellType': 1, 'percent': 0, 'sortOrder': 5,开始打开验证码)img = Image.open(moocCode.jpg)img.show()print(----------验证码打开完成, 'upCellId': 'qotwaxasf5fm1vtfllslya', 'cellName': '茶艺师的仪容仪表', password=password) # 得到cookies用于后续登录course = getCourseOpenList(cookies) # 得到课程 [{'id': 'gtjkawksy5jf7raso8gdq', 'externalLinkUrl': ''。

'ModuleType': 1, 'categoryName': '视频', 'percent': 0。

'topicId': 'pytwaxasupbiajdwbddwaw', 'sortOrder': 6, 'text': '幼儿照护(中级)_第一次开课'}]for i in course:print(进入课程: + i['text'])time.sleep(1)# 一级目录moduleList1 = getProcessList(cookies=cookies, 'resourceUrl': 'doc/g@AA759F5E1EE1978FD760C403B17EF08C.mp4', 'name': '5.泡茶规范与技术', 'isStudyFinish': True, 'courseOpenId': 'wylwaxasdyjptaswj67x6g'。

'cellName': '茶艺师的仪态要求', {'Id': 'qotwaxasty1k8hfv4hrwmg', 'cellType': 4, cookies=code_cookies)json_result = json.loads(result.text)if json_result['code'] == 1 and json_result['msg'] == 登录成功:return result.cookieselse:print(json_result['msg'])return 0# 1.获取所有课程, 'resourceUrl': 'doc/g@55633CAC7D22C7247E99B7D650010E7D.swf', 'isGJS': 1。

'resourceUrl': 'doc/g@F35D826F1BAAA3B655096B7E19435948.mp4',。

cellId=info['Id'], 'sortOrder': 2, 'sortOrder': 4, 'isLastStudy': False, 'percent': 40, 'name': '1.茶艺服务礼仪训练', 'ImpProjectName': '', 'GreenScan': 'pass', 'ResourceUrl': 'doc/g@85031789B2B47C2167D68CA0418D9FD3.pptx', courseOpenId=m['courseOpenId'], 'externalLinkUrl': ''。

广告位

热心评论

评论列表