Exemplo n.º 1
0
def main(stuid):
    print("【欢迎使用职教云补签助手】")
    print("                  By:Lan")
    date = input("请输入需要补签的日期如(2020-5-20):")
    courses = get_course(stuid, date)
    if courses == 'no':
        print("你今天没有课,好好休息")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(
                f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}'
            )
        index = int(input("请输入你要改签的课程:")) - 1
        activities = get_activity(stuid, courses["courseId"][index],
                                  courses["openClassId"][index])
        buqianname = []
        buqianid = []
        for j in range(len(activities)):
            datatype = activities[j]['DataType']
            if datatype == "签到":
                buqianname.append(activities[j]['Title'])
                buqianid.append(activities[j]['Id'])
        for i in range(len(buqianid)):
            print(f'【{i}】{buqianname[i]}')
        target = int(input("请输入要逆天改命的序号:"))
        datas = f'{{"OpenClassId":"{courses["openClassId"]}","Id":"{stuid}","SignId":"{buqianid[target]}","StuId":"{stuid}","SignResultType":1,"SourceType":2,"schoolId":"3-3sabgooohfboflpnx6bq"}}'
        xdata = {'data': f'{datas}'}
        bqurl = 'https://zjyapp.icve.com.cn/newmobileapi/faceteach/changeSignType'
        html = requests.post(url=bqurl, data=xdata).json()
        if html['code'] == 1:
            print(html['msg'])
            print("逆天改命成功,Lan's Blog:https://www.lanol.cn")
            sele = input("【1】]返回首页\n【2】返回上级")
            if sele == 2:
                main(stuid)
            else:
                from Main import main as menu
                menu()
        else:
            print(html['msg'])
            print("逆天改命失败,请联系Lan")
            sele = input("【1】返回首页\n【2】返回上级\n请选择:")
            if sele == 2:
                main(stuid)
            else:
                from Main import main as menu
                menu()
Exemplo n.º 2
0
def main(stuId):
    courses = get_course(stuId)
    if courses == 'no':
        print("你今天没有课,好好休息")
        input("回车退出!")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(
                f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}'
            )
        index = int(input("请输入你要监控的课程:")) - 1
        activities = get_activity(stuId, courses["courseId"][index],
                                  courses["openClassId"][index])

        # 反复监控,是否需要存在已开启的签到
        for i in range(18000):
            js = 0
            for j in range(len(activities)):
                activity = activities[j]
                datatype = activity['DataType']
                if datatype == '签到':
                    if activity['State'] == 2:
                        signId = activity['Id']
                        js += 1
                        print("您当前有一个签到,正在尝试帮你签到,请稍等!")
                        print(activity['Title'])

                        # 执行签到,为了能够失败重签,所以嵌套了一下

                        def panta():
                            msg = sign(signId, stuId,
                                       courses["openClassId"][index])
                            if msg == '签到成功!':
                                print(f"{msg},我要休息半小时")
                                time.sleep(1800)
                            else:
                                print(f"{msg},正在重新签到")
                                time.sleep(2)
                                panta()

                        panta()
            if js == 0:
                print(f"系统未检测到需要签到哦!", end="当前时间:")
                print(time.strftime("%H:%M:%S", time.localtime()))
                time.sleep(30)
Exemplo n.º 3
0
def Sign_Students(stuid):
    print("【欢迎使用职教云补签助手】")
    print("                  By:Lan")
    date = input("请输入需要补签的日期如(2020-5-20):")
    courses = get_course(stuid, date)
    if courses == 'no':
        print("你今天没有课,好好休息")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(
                f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}'
            )
        index = int(input("请输入你要改签到分数的课程:")) - 1
        activities = get_activity(stuid, courses["courseId"][index],
                                  courses["openClassId"][index])
        buqianname = []
        buqianid = []
        for j in range(len(activities)):
            datatype = activities[j]['DataType']
            if datatype == "签到":
                buqianname.append(activities[j]['Title'])
                buqianid.append(activities[j]['Id'])
        for i in range(len(buqianid)):
            print(f'【{i}】{buqianname[i]}')
        target = int(input("请输入要改分的序号:"))
        SignId = buqianid[target]
        activityid = activities[target]['Id']
        url = 'https://zjyapp.icve.com.cn/newmobileapi/faceTeach/getCheckStuInfo'
        data = {
            'signId': SignId,
            'activityId': activityid,
        }
        html = requests.post(url=url, data=data).json()
        for i in html['signedList']:
            if i['StuId'] == stuid:
                SignStuId = i['SignStuId']
        get_grade = input("请输入要改的分数(1-5):")
        grade_url = 'https://zjyapp.icve.com.cn/newmobileapi/faceTeach/saveSignStuScore'
        data = {'signId': SignId, 'signStuIds': SignStuId, 'score': get_grade}
        result = requests.post(url=grade_url, data=data).json()['msg']
        print(result)
        print("返回首页菜单")
        from Main import main
        main()
Exemplo n.º 4
0
def main(stuId):
    courses = get_course(stuId)
    if courses == 'no':
        print("你今天没有课,好好休息")
        input("回车退出!")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(
                f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}'
            )
        for index in range(len(courses['courseId'])):
            activities = get_activity(stuId, courses["courseId"][index],
                                      courses["openClassId"][index])
            jiankong(activities, courses['openClassId'], stuId)
            xcname = threading.Thread(target=jiankong,
                                      args=(activities,
                                            courses["courseId"][index], stuId))
            xcname.start()
Exemplo n.º 5
0
def main(stuid):
    date = input("请输入需要改分的日期如(2020-5-20):")
    courses = get_course(stuid, date)
    if courses == 'no':
        print("你今天没有课,好好休息")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}')
        index = int(input("请输入你要改分的课程:")) - 1
        activities = get_activity(stuid, courses["courseId"][index], courses["openClassId"][index])
        stormid = get_stormid(activities, stuid)
        grade = int(input("请输入分数:"))
        url = 'https://zjyapp.icve.com.cn/newmobileapi/faceTeach/saveStuStormScore'
        data = {
            'brainStormStuIds': stormid,
            'score': grade,
        }
        html = requests.post(url=url, data=data).json()
        print(html['msg'])
        main(stuid)
Exemplo n.º 6
0
def main(stuid, schoolid):
    print("【欢迎使用职教云补签助手】")
    print("注意事项:修改之后课堂表现可看到结果,老师那边会显示已参与")
    print("                  By:Lan")
    date = input("请输入需要补签的日期如(2020-5-20):")
    courses = get_course(stuid, date)
    if courses == 'no':
        print("你今天没有课,好好休息")
    else:
        print("Lan职教云助手提示您:\n您今天课表如下:")
        for i in range(len(courses['courseNmae'])):
            print(
                f'【{i + 1}】:{courses["classSection"][i]}{courses["courseNmae"][i]}'
            )
        index = int(input("请输入你要改签的课程:")) - 1
        activities = get_activity(stuid, courses["courseId"][index],
                                  courses["openClassId"][index])
        buqianname = []
        buqianid = []
        for j in range(len(activities)):
            datatype = activities[j]['DataType']
            if datatype == "签到":
                buqianname.append(activities[j]['Title'])
                buqianid.append(activities[j]['Id'])
        for i in range(len(buqianid)):
            print(f'【{i}】{buqianname[i]}')
        target = int(input("请输入要逆天改命的序号:"))
        datas = f'{{"OpenClassId":"{courses["openClassId"]}","Id":"{stuid}","SignId":"{buqianid[target]}","StuId":"{stuid}","SignResultType":1,"SourceType":2,"schoolId":"{schoolid}"}}'
        xdata = {'data': f'{datas}'}
        bqurl = 'https://zjyapp.icve.com.cn/newmobileapi/faceteach/changeSignType'
        html = requests.post(url=bqurl, data=xdata).json()
        if html['code'] == 1:
            print(html['msg'])
            print("逆天改命成功,Lan's Blog:https://www.lanol.cn")
            re_grade = input("是否需要修改签到分数:是 或 否")
            if re_grade == "是":
                SignId = buqianid[target]
                activityid = activities[target]['Id']
                url = 'https://zjyapp.icve.com.cn/newmobileapi/faceTeach/getCheckStuInfo'
                data = {
                    'signId': SignId,
                    'activityId': activityid,
                }
                html = requests.post(url=url, data=data).json()
                for i in html['signedList']:
                    if i['StuId'] == stuid:
                        SignStuId = i['SignStuId']
                get_grade = input("请输入要改的分数(1-5):")
                if int(get_grade) < 6:
                    grade_url = 'https://zjyapp.icve.com.cn/newmobileapi/faceTeach/saveSignStuScore'
                    data = {
                        'signId': SignId,
                        'signStuIds': SignStuId,
                        'score': get_grade
                    }
                    result = requests.post(url=grade_url,
                                           data=data).json()['msg']
                    print(result)
                    print("返回首页菜单")
                    from Main import main as menu
                    menu()
                else:
                    print("再见")
                    from Main import main as menu
                    menu()
        else:
            print(html['msg'])
            print("逆天改命失败,请联系Lan")
            from Main import main as menu
            menu()