吾爱破解 - 52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 27424|回复: 120
上一主题 下一主题
收起左侧

[Web逆向] 智慧职教MOOC学院-刷课分析

    [复制链接]
跳转到指定楼层
楼主
情绪666 发表于 2020-12-26 22:03 回帖奖励
本帖最后由 情绪666 于 2022-3-30 16:40 编辑

只适用 https://mooc.icve.com.cn/  
2022/03/16  已更新至Github 100分【考试+测验+作业+刷课】:https://github.com/11273/mooc-work-answer
2022/03/30  以下内容以后不在此处更新,具体内容将发布至Github

1. 现在职教云(https://zjy2.icve.com.cn/)的刷课方法基本没用,所以没找职教云的接口
2. mooc的用的人不多,但也有课在里面,经过分析,只要调用一个接口就能快速刷课
3. 用的是python做的,可以用别的,看懂了可以自己搞,甚至可以用postnam软件一个一个发请求都行
4. 甚至可以用js做,都是发请求什么的,有时间的可以搞一下
5. 通过多次调试,确定目前(2020-12-26)能使用
6. 没弄 考试,作业 的答题,因为要找接口,没有
7. 时间问题没捕获任何异常,有报错解决不了的可以发出来一起解决
8. python技术不行,后面都是for循环甚至嵌套,可能过几天我都不知道是什么了,凑合能用
9. 作业没做也会显示完成,但是未完成,不要忘记做作业


嫌下面代码太长的可以下载这个: mooc.zip (3.95 KB, 下载次数: 877)

(链接太长,放在这里)
接口名称
介绍
URL参数(*为打码,可选参数没写进去)
接口1 获取一级目录https://mooc.icve.com.cn/study/learn/getProcessListcourseOpenId=fhe****************knw
接口2获取二级目录https://mooc.icve.com.cn/study/learn/getTopicByModuleIdcourseOpenId=fhe****************knw&moduleId=kxila*************lxua
接口3获取三级(四级)目录https://mooc.icve.com.cn/study/learn/getCellByTopicIdcourseOpenId=fhe****************knw&topicId=kxila*************hfqfa
接口4获取视频总时长https://mooc.icve.com.cn/study/learn/viewDirectorycourseOpenId=fhe****************knw&cellId=kxila*****************guga
接口5刷课接口(主要)https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLongcourseOpenId=fhe****************knw&cellId=kxila*****************guga&
auvideoLength=998&videoTimeTotalLong=998



下面过程均是处于登录状态



  一、找接口  

1. 根据下面这个方法,可以拿到接口1,我们可以看到,里面我们需要的只有 一级目录大标题(初识Java语言),我们拿到了就需要找到第二个接口,就是二级目录([url=]单元引例描述[/url]




2. 我们点一下第二个目录( Java语言基础),按照步骤,可以得到接口2




3. 剩下的就是继续找三级目录,我们点一下([url=]单元引例描述[/url]),会出现一个接口,得到接口3,就是详细信息






4. 于是我们随便点一个视频,得到接口4


5. 我们拿到了需要的内容,于是找刷课的接口,刷课的接口在 步骤4 播放视频那,要等个十几秒左右,就会出来,下面第一张图片我们需要点到参数那,看第二张图的参数




  、测试刷课接口是否正确  

我们用软件发送一个请求,成功




  、效果图  

  、Python代码实现(不要改太快,会封,默认我这个就可以,代码重复高,没时间改,默认都是全刷,会改的可以改成指定课程刷,或者找我改一下)  

[Python] 纯文本查看 复制代码
# -*- coding: utf-8 -*-
# [url=home.php?mod=space&uid=238618]@Time[/url] : 2020/12/26 15:17
# [url=home.php?mod=space&uid=686208]@AuThor[/url] : Melon
# [url=home.php?mod=space&uid=406162]@site[/url] : 
# [url=home.php?mod=space&uid=267492]@file[/url] : mooc.py
# @Software: PyCharm
import time
import requests
import json

from PIL import Image

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36',
}


# [url=https://mooc.icve.com.cn/portal/LoginMooc/loginSystem?userName=LH17001&password=qwer%40123&verifycode=2405]https://mooc.icve.com.cn/portal/LoginMooc/loginSystem?userName=LH17001&password=qwer%40123&verifycode=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.登录,拿到cookie------>[url=https://mooc.icve.com.cn/portal/LoginMooc/loginSystem]https://mooc.icve.com.cn/portal/LoginMooc/loginSystem[/url]
def login(name, 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/loginSystem"
    codeResult = requests.post(url=codeUrl, headers=headers)
    with open("moocCode.jpg", "wb", ) as f:
        f.write(codeResult.content)
    # 验证码的cookies
    code_cookies = codeResult.cookies
    print("---------->验证码获取完成,开始打开验证码")
    img = Image.open("moocCode.jpg")
    img.show()
    print("---------->验证码打开完成,请输入")
    data = {
        'userName': name,
        'password': password,
        'verifycode': input("输入验证码:")
    }
    result = requests.post(url=loginUrl, data=data, headers=headers, cookies=code_cookies)
    json_result = json.loads(result.text)
    if json_result['code'] == 1 and json_result['msg'] == "登录成功":
        return result.cookies
    else:
        print(json_result['msg'])
        return 0


# 1.获取所有课程,拿到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","text":"茶艺与茶文化_第四次开课"}]
    '''
    url = "https://mooc.icve.com.cn/portal/course/getCourseOpenList"
    result = json.loads(requests.post(url=url, headers=headers, 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, courseId):
    '''
    得到一级目录
    :param cookies: cookies
    :param courseId: gtjkawksy5jf7raso8gdq
    :return: [{'id': 'oitwaxas05rp25uktqp8a', 'name': '1.茶艺服务礼仪训练', 'sortOrder': 1, 'percent': 40, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'qotwaxasf7tahcyr6kd8wa', 'name': '2.茶具的认识与使用', 'sortOrder': 2, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxasc7nbpxt8pmkjdw', 'name': '3.泡茶操作规范', 'sortOrder': 3, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxastoradnurwvdxq', 'name': '4.茶叶认识', 'sortOrder': 4, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxasv7zer5q5cks8gg', 'name': '5.泡茶规范与技术', 'sortOrder': 5, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'ritwaxashqlasilv5ziiew', 'name': '6.茶文化解读', 'sortOrder': 6, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}]
    '''
    url = "https://mooc.icve.com.cn/study/learn/getProcessList"
    result = json.loads(requests.post(url=url, data={'courseOpenId': courseId}, headers=headers, cookies=cookies).text)
    return result['proces']['moduleList']


# 3.得到二级目录-------->[url=https://mooc.icve.com.cn/study/learn/getTopicByModuleId?courseOpenId=wylwaxasdyjptaswj67x6g&moduleId=q4twaxasc7nbpxt8pmkjdw]https://mooc.icve.com.cn/study/learn/getTopicByModuleId?courseOpenId=wylwaxasdyjptaswj67x6g&moduleId=q4twaxasc7nbpxt8pmkjdw[/url]
def getTopicByModuleId(cookies, courseId, moduleId):
    '''
    得到二级目录
    :param cookies: cookies
    :param courseId: courseOpenId
    :param moduleId: moduleId
    :return: [{'id': 'pytwaxasupbiajdwbddwaw', 'name': '茶艺服务人员的仪容仪态', 'sortOrder': 0, 'upTopicId': '0', 'isLastStudy': False, 'studyStatus': 0}, {'id': 'qotwaxasyjbjd0mnjgxz1w', 'name': '各种行茶礼仪', 'sortOrder': 1, 'upTopicId': 'pytwaxasupbiajdwbddwaw', 'isLastStudy': False, 'studyStatus': 0}]
    '''
    url = "https://mooc.icve.com.cn/study/learn/getTopicByModuleId"
    data = {
        'courseOpenId': courseId,
        'moduleId': moduleId
    }
    result = json.loads(requests.post(url=url, data=data, headers=headers, cookies=cookies).text)
    return result['topicList']


# 4.获得三级目录(详细信息)--------->[url=https://mooc.icve.com.cn/study/learn/getCellByTopicId?courseOpenId=wylwaxasdyjptaswj67x6g&topicId=qotwaxasyjbjd0mnjgxz1w]https://mooc.icve.com.cn/study/learn/getCellByTopicId?courseOpenId=wylwaxasdyjptaswj67x6g&topicId=qotwaxasyjbjd0mnjgxz1w[/url]
def getCellByTopicId(cookies, courseId, topicId):
    '''
    获得三级目录(详细信息)
    :param cookies: cookies
    :param courseId: courseOpenId
    :param topicId: topicId
    :return: [{'Id': 'qytwaxaso6hhfh3x0dnbw', 'resId': '', 'cellType': 4, 'isGJS': 1, 'parentId': 'pytwaxasupbiajdwbddwaw', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'topicId': 'pytwaxasupbiajdwbddwaw', 'categoryName': '子节点', 'cellName': '1.茶艺服务人员的妆容仪表要求', 'resourceUrl': '', 'externalLinkUrl': '', 'cellContent': '', 'sortOrder': 1, 'isAllowDownLoad': False, 'childNodeList': [{'Id': 'qotwaxasp4vae7z3zcwqua', 'resId': '', 'cellType': 1, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qytwaxaso6hhfh3x0dnbw', 'categoryName': '视频', 'cellName': '茶艺师的仪容仪表要求', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': 'doc/g@F35D826F1BAAA3B655096B7E19435948.mp4', 'externalLinkUrl': '', 'cellContent': 'doc/g@F35D826F1BAAA3B655096B7E19435948.mp4', 'upCellId': '0', 'isStudyFinish': True, 'isUnlock': True}, {'Id': 'qotwaxasvrbgva1hlhnjuw', 'resId': '', 'cellType': 1, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qytwaxaso6hhfh3x0dnbw', 'categoryName': 'swf', 'cellName': '茶艺服务人员的仪容仪表要求', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': 'doc/g@55633CAC7D22C7247E99B7D650010E7D.swf', 'externalLinkUrl': '', 'cellContent': 'doc/g@55633CAC7D22C7247E99B7D650010E7D.swf', 'upCellId': 'qotwaxasp4vae7z3zcwqua', 'isStudyFinish': True, 'isUnlock': True}, {'Id': 'qotwaxasvrbejkntkxphtw', 'resId': '3ixwaxasg5ba3ri5avr79a', 'cellType': 6, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qytwaxaso6hhfh3x0dnbw', 'categoryName': '作业', 'cellName': '茶艺师的仪容仪表', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': '', 'externalLinkUrl': '', 'cellContent': '', 'upCellId': 'qotwaxasvrbgva1hlhnjuw', 'isStudyFinish': False, 'isUnlock': True}], 'upCellId': '-1', 'isStudyFinish': False, 'isUnlock': True}, {'Id': 'qotwaxasfj5jphzi8yiooq', 'resId': '', 'cellType': 4, 'isGJS': 1, 'parentId': 'pytwaxasupbiajdwbddwaw', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'topicId': 'pytwaxasupbiajdwbddwaw', 'categoryName': '子节点', 'cellName': '2.茶艺服务人员的仪态要求', 'resourceUrl': '', 'externalLinkUrl': '', 'cellContent': '', 'sortOrder': 2, 'isAllowDownLoad': False, 'childNodeList': [{'Id': 'qotwaxasf5fm1vtfllslya', 'resId': '', 'cellType': 1, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qotwaxasfj5jphzi8yiooq', 'categoryName': '视频', 'cellName': '茶艺师的仪态', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': 'doc/g@AA759F5E1EE1978FD760C403B17EF08C.mp4', 'externalLinkUrl': '', 'cellContent': 'doc/g@AA759F5E1EE1978FD760C403B17EF08C.mp4', 'upCellId': 'qotwaxasvrbejkntkxphtw', 'isStudyFinish': True, 'isUnlock': True}, {'Id': 'qotwaxasy4hpjggnawg', 'resId': '', 'cellType': 1, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qotwaxasfj5jphzi8yiooq', 'categoryName': 'swf', 'cellName': '茶艺服务人员的仪态要求', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': 'doc/g@66FFBBA9CB37B03D4245418690E54815.swf', 'externalLinkUrl': '', 'cellContent': 'doc/g@66FFBBA9CB37B03D4245418690E54815.swf', 'upCellId': 'qotwaxasf5fm1vtfllslya', 'isStudyFinish': True, 'isUnlock': True}, {'Id': 'qotwaxasty1k8hfv4hrwmg', 'resId': '3ixwaxasu41ocvxkwprlxa', 'cellType': 6, 'isGJS': 1, 'isAllowDownLoad': False, 'parentId': 'qotwaxasfj5jphzi8yiooq', 'categoryName': '作业', 'cellName': '茶艺师的仪态要求', 'courseOpenId': 'wylwaxasdyjptaswj67x6g', 'resourceUrl': '', 'externalLinkUrl': '', 'cellContent': '', 'upCellId': 'qotwaxasy4hpjggnawg', 'isStudyFinish': False, 'isUnlock': True}], 'upCellId': '-1', 'isStudyFinish': False, 'isUnlock': True}]
    '''
    url = "https://mooc.icve.com.cn/study/learn/getCellByTopicId"
    data = {
        'courseOpenId': courseId,
        'topicId': topicId
    }
    result = json.loads(requests.post(url=url, data=data, headers=headers, cookies=cookies).text)
    return result['cellList']


# 5.拿到学习时长等信息---------->[url=https://mooc.icve.com.cn/study/learn/viewDirectory?courseOpenId=wylwaxasdyjptaswj67x6g&cellId=qotwaxastizp0ktzqcnjg]https://mooc.icve.com.cn/study/learn/viewDirectory?courseOpenId=wylwaxasdyjptaswj67x6g&cellId=qotwaxastizp0ktzqcnjg[/url]
def viewDirectory(cookies, courseOpenId, cellId):
    '''
    拿到学习时长等信息
    :param cookies: cookies
    :param courseOpenId: courseOpenId
    :param cellId: cellId
    :return: {'Id': 'cbwagosnyjooghaevg6fw', 'DateCreated': '/Date(1603976559000)/', 'CourseOpenId': 'gtjkawksy5jf7raso8gdq', 'TopicId': 'qc6vagosurpneukvl1nh1w', 'ParentId': 'qc6vagosly1owrpgpu6rg', 'CellName': '幼儿照护员的职业素养', 'CategoryName': 'ppt文档', 'CellType': 1, 'ResourceUrl': 'doc/g@85031789B2B47C2167D68CA0418D9FD3.pptx', 'ExternalLinkUrl': None, 'CellContent': None, 'RarJsonData': None, 'ztWay': 0, 'SpaceCount': 0, 'IsAllowDownLoad': False, 'KnowledgeIds': '', 'KnowledgeTitle': '', 'SortOrder': 1, 'FromType': 2, 'ImpProjectId': '', 'ImpProjectName': '', 'ImpDocId': '', 'ImpDocTitle': '', 'ResId': '', 'NewSortOrder': 0, 'FromId': None, 'VideoTimeLong': 0, 'DocSize': 9023286, 'PageCount': 8, 'DateModified': '/Date(-62135596800000)/', 'VideoQuestionCount': 0, 'PlayType': 0, 'FromMOOCCellId': '', 'DocId': 'cbwagosz7nmuxz8cxclg', 'GreenScan': 'pass', 'GreenScanScene': '', 'TableName': 'MOOC_CourseProcessCell'}
    '''
    time.sleep(1)
    url = "https://mooc.icve.com.cn/study/learn/viewDirectory"
    data = {
        'courseOpenId': courseOpenId,
        'cellId': cellId
    }
    result = requests.post(url=url, data=data, headers=headers, cookies=cookies)
    result = json.loads(result.text)
    return result['courseCell']


# 6.开始刷课--------->[url=https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLong?courseOpenId=wylwaxasdyjptaswj67x6g&cellId=qotwaxastizp0ktzqcnjg&auvideoLength=487&videoTimeTotalLong=487]https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLong?courseOpenId=wylwaxasdyjptaswj67x6g&cellId=qotwaxastizp0ktzqcnjg&auvideoLength=487&videoTimeTotalLong=487[/url]
def statStuProcessCellLogAndTimeLong(cookies, courseOpenId, cellId, videoTimeTotalLong):
    '''
    开始刷课
    :param cookies: cookies
    :param courseOpenId: courseOpenId
    :param cellId: cellId
    :param videoTimeTotalLong: videoTimeTotalLong
    :return: {"code":1,"isStudy":true}
    '''
    time.sleep(1.5)
    url = "https://mooc.icve.com.cn/study/learn/statStuProcessCellLogAndTimeLong"
    data = {
        'courseOpenId': courseOpenId,
        'cellId': cellId,
        'auvideoLength': videoTimeTotalLong,
        'videoTimeTotalLong': videoTimeTotalLong
    }
    result = json.loads(requests.post(url=url, data=data, headers=headers, cookies=cookies).text)
    return result


def start(name, password):
    cookies = login(name=name, password=password)  # 得到cookies用于后续登录
    course = getCourseOpenList(cookies)  # 得到课程 [{'id': 'gtjkawksy5jf7raso8gdq', 'text': '幼儿照护(中级)_第一次开课'}]
    for i in course:
        print("进入课程:" + i['text'])
        time.sleep(1)
        # 一级目录
        moduleList1 = getProcessList(cookies=cookies, courseId=i[
            'id'])  # [{'id': 'oitwaxas05rp25uktqp8a', 'name': '1.茶艺服务礼仪训练', 'sortOrder': 1, 'percent': 40, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'qotwaxasf7tahcyr6kd8wa', 'name': '2.茶具的认识与使用', 'sortOrder': 2, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxasc7nbpxt8pmkjdw', 'name': '3.泡茶操作规范', 'sortOrder': 3, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxastoradnurwvdxq', 'name': '4.茶叶认识', 'sortOrder': 4, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'q4twaxasv7zer5q5cks8gg', 'name': '5.泡茶规范与技术', 'sortOrder': 5, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}, {'id': 'ritwaxashqlasilv5ziiew', 'name': '6.茶文化解读', 'sortOrder': 6, 'percent': 0, 'ModuleType': 1, 'ResId': '', 'isUnlock': True}]
        for j in moduleList1:
            time.sleep(0.25)
            print("\t" + j['name'])
            # 二级目录
            moduleList2 = getTopicByModuleId(cookies=cookies, courseId=i['id'], moduleId=j['id'])
            for k in moduleList2:
                time.sleep(0.25)
                print("\t\t" + k['name'])
                # 三级目录
                moduleList3 = getCellByTopicId(cookies=cookies, courseId=i['id'], 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------课程完成,不刷课-------")
                            continue
                        # 拿课程信息
                        info = viewDirectory(cookies=cookies, courseOpenId=m['courseOpenId'], cellId=m['Id'])
                        # 将信息拿去刷课
                        if not m['categoryName'] == "视频" and not m['categoryName'] == "音频":
                            # 如果不是视频或者音频
                            isOK = statStuProcessCellLogAndTimeLong(cookies=cookies, courseOpenId=info['CourseOpenId'],
                                                                    cellId=info['Id'],
                                                                    videoTimeTotalLong=0)
                        # 四级目录(最终)
                        else:
                            # 是视频或者音频
                            isOK = statStuProcessCellLogAndTimeLong(cookies=cookies, courseOpenId=info['CourseOpenId'],
                                                                    cellId=info['Id'],
                                                                    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------课程完成,不刷课-------")
                                continue
                            # 拿课程信息
                            info = viewDirectory(cookies=cookies, courseOpenId=n['courseOpenId'], cellId=n['Id'])
                            # 将信息拿去刷课
                            if not n['categoryName'] == "视频" and not n['categoryName'] == "音频":
                                # 如果不是视频或者音频
                                isOK = statStuProcessCellLogAndTimeLong(cookies=cookies,
                                                                        courseOpenId=info['CourseOpenId'],
                                                                        cellId=info['Id'],
                                                                        videoTimeTotalLong=0)
                            else:
                                # 是视频或者音频
                                isOK = statStuProcessCellLogAndTimeLong(cookies=cookies,
                                                                        courseOpenId=info['CourseOpenId'],
                                                                        cellId=info['Id'],
                                                                        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 = "密码"    # 密码
    # ====================== # 然后运行,然后输入验证码
    start(name=name, password=password)

















免费评分

参与人数 31吾爱币 +35 热心值 +27 收起 理由
xiaojiuwoer008 + 1
无耻伸手党 + 1 + 1 我很赞同!
zheng150 + 1 + 1 谢谢@Thanks!
晓晓UZI + 1 我很赞同!
baobao056 + 1 + 1 我很赞同!
8889536 + 1 我很赞同!
清歡渡 + 1 + 1 我很赞同!
WAlitudealiy + 1 + 1 谢谢@Thanks!
Hmily + 7 + 1 欢迎分析讨论交流,吾爱破解论坛有你更精彩!
mei564335 + 1 + 1 用心讨论,共获提升!
紫色咸鱼王 + 1 + 1 非常好用
5151diy + 1 + 1 我很赞同!
FFF全部成为F + 1 用心讨论,共获提升!
hexin123 + 1 + 1 谢谢@Thanks!
AwYe + 1 + 1 热心回复!
别叫我小夏天 + 1 + 1 我很赞同!
犹抱琵琶半遮面 + 1 + 1 谢谢@Thanks!
Lucifer_BW + 1 + 1 谢谢@Thanks!
小黑侠 + 1 + 1 感谢发布原创作品,吾爱破解论坛因你更精彩!
cctv666 + 1 + 1 谢谢@Thanks!
chkds + 1 + 1 用心讨论,共获提升!
aichifanqie + 1 + 1 谢谢@Thanks!
fengbolee + 1 + 1 用心讨论,共获提升!
zanaa007 + 1 + 1 用心讨论,共获提升!
fm1562270258 + 1 + 1 我很赞同! 刚需感谢
wh2510 + 1 感谢大佬分享
涂秋 + 1 热心回复!
湿求了鸭 + 1 + 1 我很赞同!
H什么的最喜欢了 + 1 + 1 谢谢@Thanks!
晚辈小生 + 1 + 1 谢谢@Thanks!
老虎i + 1 + 1 等一个一键的软件!

查看全部评分

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

推荐
 楼主| 情绪666 发表于 2021-6-2 17:19 |楼主
无耻伸手党 发表于 2021-5-30 20:57
怎样添加?有没有详细教程?

for i in course:
##################################################
#下面两行表示  课程名是 实用英语  跳过,课程名可能和mooc上面的不一样,具体看print("进入课程:" + i['courseName'])这个打印出来的名字
        if i['courseName'] == "实用英语":
            continue
#################################################
        print("进入课程:" + i['courseName'])
沙发
yilufeiyang 发表于 2020-12-26 22:14
3#
rainbow270118 发表于 2020-12-26 22:20
4#
老虎i 发表于 2020-12-26 22:24
谢谢楼主 能做一个一键的软件吗?
5#
hexin123 发表于 2020-12-26 22:33
nb,谢谢楼主
6#
污渍猫 发表于 2020-12-26 22:37
蹲个成品
7#
H什么的最喜欢了 发表于 2020-12-26 22:53
。。。。。我要是早看到这个帖子就好了,我求助的那个学习平台我自己研究出来了,和你这个网站一模一样,我现在也是考试没研究出来,老哥有机会可以一起交流一下
8#
搞妇帅。 发表于 2020-12-26 22:55
感谢楼主
9#
bikasuo 发表于 2020-12-26 22:58
好家伙这几天刚需要就刷到了,楼主牛逼
10#
涂秋 发表于 2020-12-26 23:25
感谢大哥,我可以仔细分析理解了
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

返回列表

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-11-15 09:31

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表