智慧职教云,云课堂,刷课,签到,查作业考试答案软件,手机刷课软件,职教云刷课[记一次软件开发经历],职教云刷课脚本开源!

您所在的位置:网站首页 云课堂智慧职教网址刷课为什么只刷得了视频 智慧职教云,云课堂,刷课,签到,查作业考试答案软件,手机刷课软件,职教云刷课[记一次软件开发经历],职教云刷课脚本开源!

智慧职教云,云课堂,刷课,签到,查作业考试答案软件,手机刷课软件,职教云刷课[记一次软件开发经历],职教云刷课脚本开源!

2024-07-16 23:37| 来源: 网络整理| 查看: 265

因为疫情我们被迫在家学习。上网课看课件就很烦人,于是就想写一个软件能帮助我看课件,解放我的双手

项目构思

本来是用python做的电脑端但是由于电脑携带不方便所以就想开发一个app在手机上面也能刷课 说干就干 先构思本来打算全部工作都由前端来完成,不用服务端的,后来发现有些东西前端写着太麻烦了于是就有了现在这个样子

使用php做后端开发api 使用java做前端开发

经过几个月的开发现在他已经变得非常完善

具体功能有 1.题库考试 答案查询 2.职教云刷课 包括评论、 纠错、问答 3.职教云mooc刷课(仅课件) 4.免密码签到 5.头脑风暴 讨论同学答案查询 可以体验一下

下载地址:https://lanzous.com/b00tku0te python职教云刷课开源 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484import requests import json import time import random from urllib import parse headers = {     'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.87 Safari/537.36', } def logo():     """     登录     :return:返回(0)登录用户信息   返回(1)cookies     """     url = "https://zjyapp.icve.com.cn/newmobileapi/mobilelogin/newlogin"     data = {         'userName': input("请输入用户名:"),  #         'userPwd': input("请输入密码:"),  #         'verifyCode': '',     }     try:         r = requests.post(url=url, headers=headers, data=data)         r.raise_for_status()         r.encoding = r.apparent_encoding         cookie = requests.utils.dict_from_cookiejar(r.cookies)         print(r.text)         print(cookie)         return r.text, cookie     except:         return '操作异常' def logostuSign(StuId, OpenClassId, SignId):     data = {         'data': "{'SignResultType': 1, 'StuId': '" + StuId + "', 'OpenClassId': '" + OpenClassId + "', 'SignId': '" + SignId + "', 'Id': '" + StuId + "', 'SourceType': 3}",         'sourceType': 3     }     print(data)     url = "https://zjyapp.icve.com.cn/newMobileAPI/FaceTeach/changeSignType"     try:         r = requests.post(url=url, headers=headers, data=data)         print(r.text)         return r.text     except:         return '签到异常' def getcourse(cookies):     """     获取课程列表     :param cookies:     :return: json     """     url = "https://zjy2.icve.com.cn/api/student/learning/getLearnningCourseList"     try:         r = requests.post(url=url, headers=headers, cookies=cookies)         print(r.text)         return r.text     except:         return '获取课程操作异常' def getunit(cookies, courseOpenId, openClassId):     """     获取单元信息     :param cookies:     :param courseOpenId:课程ID     :param openClassId:     :return:     """     url = "https://zjy2.icve.com.cn/api/study/process/getProcessList"     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         return r.text     except:         return '获取单元操作异常' def getsection(cookies, courseOpenId, moduleId):     """     获取章节ID     :param cookies:     :param courseOpenId:课程ID     :param moduleId: 单元ID     :return: json     """     url = "https://zjy2.icve.com.cn/api/study/process/getTopicByModuleId"     data = {         "courseOpenId": courseOpenId,         "moduleId": moduleId,     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         return r.text     except:         return '获取章节操作异常' def getclassinfo(cookies, courseOpenId, openClassId, topicId):     url = "https://zjy2.icve.com.cn/api/study/process/getCellByTopicId"     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "topicId": topicId,     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         return r.text     except:         return '获取节课操作异常' def getvideo(cookies, courseOpenId, openClassId, cellId, moduleId):     url = "https://zjy2.icve.com.cn/api/common/Directory/viewDirectory"     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "cellId": cellId,         "flag": "s",         "moduleId": moduleId,     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         return r.text     except:         return '获取视频详细信息操作异常' def videodispose(cookies, courseOpenId, openClassId, cellId, token, videoTimeTotalLong):     """     处理视频     :param cookies:     :param courseOpenId:     :param openClassId:     :param cellId:     :param token:     :param videoTimeTotalLong: 视频长度     :return:     """     url = "https://zjy2.icve.com.cn/api/common/Directory/stuProcessCellLog"     for i in range(20, int(videoTimeTotalLong), 20):         i = i + random.choice([0.134831, 0.234831, 0.334831, 0.434831, 0.534831, 0.634831])         data = {             "courseOpenId": courseOpenId,             "openClassId": openClassId,             "cellId": cellId,             "cellLogId": "",             "picNum": 0,             "studyNewlyTime": i,             "studyNewlyPicNum": 0,             "token": token         }         # print(data)         try:             r = requests.post(url=url, headers=headers, cookies=cookies, data=data)             print(r.text)             print("正在处理中...")             time.sleep(16)         except:             print("提交视频进度异常!")     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "cellId": cellId,         "cellLogId": "",         "picNum": 0,         "studyNewlyTime": videoTimeTotalLong,         "studyNewlyPicNum": 0,         "token": token     }     # print(data)     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         print("提交视频成功")         print(r.text)         return     except:         print("提交视频完结异常!") def getppt(cookies, courseOpenId, openClassId, cellId, moduleId):     """     获取ppt详细信息     :param cookies:     :param courseOpenId:     :param openClassId:     :param cellId:     :param moduleId:     :return:     """     url = "https://zjy2.icve.com.cn/api/common/Directory/viewDirectory"     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "cellId": cellId,         "flag": "s",         "moduleId": moduleId,     }     url1 = "https://zjy2.icve.com.cn/api/common/Directory/getCellCommentData"     data1 = {         "courseOpenId": courseOpenId,         "cellId": cellId,         "openClassId": openClassId,         "type": 0     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         r1 = requests.post(url=url1, headers=headers, cookies=cookies, data=data1)         return r.text     except:         return '获取ppt信息操作异常' def pptdispose(cookies, courseOpenId, openClassId, cellId, token, pageCount):     url = "https://zjy2.icve.com.cn/api/common/Directory/stuProcessCellLog"     for i in range(20, int(pageCount), 20):         data = {             "courseOpenId": courseOpenId,             "openClassId": openClassId,             "cellId": cellId,             "cellLogId": "",             "picNum": i,             "studyNewlyTime": 0,             "studyNewlyPicNum": i,             "token": token         }         try:             r = requests.post(url=url, headers=headers, cookies=cookies, data=data)             print(r.text)             time.sleep(3)             print("正在处理中.....")         except:             print('ppt处理中途操作异常')     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "cellId": cellId,         "cellLogId": "",         "picNum": pageCount,         "studyNewlyTime": 0,         "studyNewlyPicNum": pageCount,         "token": token     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         print(r.text)         return r.text     except:         return 'ppt处理结束操作异常' def statement(cookies, courseOpenId, openClassId, moduleId, cellId, cellName):     """     声明现在观看的课程     :param courseOpenId:     :param openClassId:     :param moduleId:     :param cellId:     :param cellName: 名称     :return:     """     url = "https://zjy2.icve.com.cn/api/common/Directory/changeStuStudyProcessCellData"     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "moduleId": moduleId,         "cellId": cellId,         "cellName": cellName,     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         print(r.text)         return r.text     except:         return '声明修改域异常' def comment(cookies, courseOpenId, openClassId, cellId):     url = "https://zjy2.icve.com.cn/api/common/Directory/addCellActivity"     print("--++"*50)     contentlist = [         '此课程讲的非常好。',         '此课程采用多媒体教学设施使讲课效果良好。',         '老师讲的很好',         '课件不错,点赞',         '讲的不错,都明白了,点赞!'     ]     data = {         "courseOpenId": courseOpenId,         "openClassId": openClassId,         "content": random.choice(contentlist),         "cellId": cellId,         "star": 5,         "activityType": 1     }     try:         r = requests.post(url=url, headers=headers, cookies=cookies, data=data)         print(r.text)         return r.text     except:         return '发布评论异常' if __name__ == '__main__':     res = logo()     cokie = res[1]     # 用户信息     reslogininfo = res[0]     logo_info = json.loads(reslogininfo)     try:         displayName = logo_info["displayName"]     except:         print("请检查账号信息")         input("按任意键退出程序....")         exit()     userName = logo_info["userName"]     userId = logo_info["userId"]     print("你好! %s\n欢迎来到秋枫助手\n学号为:%s" % (displayName, userName))     infocourse = getcourse(cokie)     infocourse = json.loads(infocourse)     print(infocourse)     ID = 1     # logostuSign(cokie)     # exit()     for i in infocourse["courseList"]:         print("ID:%d    课程名称:%s" % (ID, i["courseName"]))         ID += 1         # print(i)     while (True):         try:             ocourseid = int(input("请输入课程ID:"))             ocourseId = infocourse["courseList"][ocourseid - 1]["Id"]             courseOpenId = infocourse["courseList"][ocourseid - 1]["courseOpenId"]             openClassId = infocourse["courseList"][ocourseid - 1]["openClassId"]             break         except:             print("请输入正确的课程ID")     iscomment=0     while(True):         try:             iscommentif=input("是否开启随机评论:[1]【开启】[0]【不开启】,请输入1或者0:")             if iscommentif=="0":                 iscomment=0                 break             elif iscommentif =="1":                 iscomment=1                 break             print("请输入1或者0")         except:             print("请输入1或者0")     # 获取单元信息     infounit = getunit(cokie, courseOpenId, openClassId)     infounit = json.loads(infounit)     print(infounit)     for i in infounit["progress"]["moduleList"]:         print(i)         print("单元名称:%s    进度:%s" % (i["name"], i["percent"]))         if int(i["percent"]) == 100:             print("本单元已完成,跳过!")             continue         moduleId = i["id"]         infosection = getsection(cokie, courseOpenId, moduleId)         infosection = json.loads(infosection)         print(infosection)         for i in infosection["topicList"]:             print("小节名称:%s" % (i["name"]))             topicId = i["id"]             infoclassinfo = getclassinfo(cokie, courseOpenId, openClassId, topicId)             infoclassinfo = json.loads(infoclassinfo)             print(infoclassinfo)             for i in infoclassinfo["cellList"]:                 print("每节课的详细信息开始", end="")                 print("*" * 160)                 print(i)                 time.sleep(5)                 cellId = i["Id"]                 if i["categoryName"] == "视频" or i["categoryName"] == "音频":                     print("开始处理视频.....")                     if iscomment==1:                         comment(cokie, courseOpenId, openClassId, cellId)                     if int(i["stuCellPercent"]) == 100:                         print("本节课已学完啦!跳过!")                         continue                     cellName = i["cellName"]                     statement(cokie, courseOpenId, openClassId, moduleId, cellId, cellName)                     infovideo = getvideo(cokie, courseOpenId, openClassId, cellId, moduleId)                     infovideo = json.loads(infovideo)                     print(infovideo)                     try:                         if infoppt["code"] == -33:                             continue                     except:                         pass                     token = infovideo["guIdToken"]                     videoTimeTotalLong = infovideo["audioVideoLong"]                     videodispose(cokie, courseOpenId, openClassId, cellId, token, videoTimeTotalLong)                     # exit()                 elif i["categoryName"] == "ppt" or i["categoryName"] == "文档" or i["categoryName"] == "链接" or i["categoryName"] == "图文" or i["categoryName"] == "图片"or i["categoryName"] == "压缩包" or i["categoryName"] == "swf":                     print("开始处理文档.....")                     if iscomment == 1:                         comment(cokie, courseOpenId, openClassId, cellId)                     if int(i["stuCellPercent"]) == 100:                         print("本节课已学完啦!跳过!")                         continue                     cellName = i["cellName"]                     statement(cokie, courseOpenId, openClassId, moduleId, cellId, cellName)                     infoppt = getppt(cokie, courseOpenId, openClassId, cellId, moduleId)                     infoppt = json.loads(infoppt)                     print(infoppt)                     try:                         if infoppt["code"] == -33:                             continue                     except:                         pass                     token = infoppt["guIdToken"]                     pageCount = infoppt["pageCount"]                     pptdispose(cokie, courseOpenId, openClassId, cellId, token, pageCount)                 elif i["categoryName"] == "子节点":                     for zz in i["childNodeList"]:                         print("=" * 100)                         print(zz)                         print("=" * 100)                         cellId = zz["Id"]                         cellName = zz["cellName"]                         if zz["categoryName"] == "视频" or zz["categoryName"] == "音频":                             print("开始处理视频.....")                             if iscomment == 1:                                 comment(cokie, courseOpenId, openClassId, cellId)                             if int(zz["stuCellFourPercent"]) == 100:                                 print("本节课已学完啦!跳过!")                                 continue                             statement(cokie, courseOpenId, openClassId, moduleId, cellId, cellName)                             infovideo = getvideo(cokie, courseOpenId, openClassId, cellId, moduleId)                             infovideo = json.loads(infovideo)                             print(infovideo)                             try:                                 if infoppt["code"] == -33:                                     continue                             except:                                 pass                             token = infovideo["guIdToken"]                             videoTimeTotalLong = infovideo["audioVideoLong"]                             videodispose(cokie, courseOpenId, openClassId, cellId, token, videoTimeTotalLong)                             # exit()                         elif zz["categoryName"] == "ppt" or zz["categoryName"] == "文档" or zz["categoryName"] == "链接" or zz["categoryName"] == "图文" or zz["categoryName"] == "图片" or zz["categoryName"] == "压缩包" or zz["categoryName"] == "swf":                             print("开始处理文档.....")                             if iscomment == 1:                                 comment(cokie, courseOpenId, openClassId, cellId)                             if int(zz["stuCellFourPercent"]) == 100:                                 print("本节课已学完啦!跳过!")                                 continue                             statement(cokie, courseOpenId, openClassId, moduleId, cellId, cellName)                             infoppt = getppt(cokie, courseOpenId, openClassId, cellId, moduleId)                             infoppt = json.loads(infoppt)                             print(infoppt)                             try:                                 if infoppt["code"] == -33:                                     continue                             except:                                 pass                             token = infoppt["guIdToken"]                             pageCount = infoppt["pageCount"]                             pptdispose(cokie, courseOpenId, openClassId, cellId, token, pageCount)                 print("-" * 100)


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3