diff --git a/api/base.py b/api/base.py index 59aff43..234123a 100644 --- a/api/base.py +++ b/api/base.py @@ -111,7 +111,6 @@ def get_job_list(self, _clazzid, _courseid, _cpi, _knowledgeid): return _job_list, _job_info def get_enc(self, clazzId, jobid, objectId, playingTime, duration, userid): - # https://github.com/ZhyMC/chaoxing-xuexitong-autoflush/blob/445c8d8a8cc63472dd90cdf2a6ab28542c56d93b/logger.js return md5( f"[{clazzId}][{userid}][{jobid}][{objectId}][{playingTime * 1000}][d_yHJ!$pdA~5][{duration * 1000}][0_{duration}]" .encode()).hexdigest() @@ -143,10 +142,10 @@ def study_video(self, _course, _job, _job_info, _speed: float = 1): _session.headers.update() _info_url = f"https://mooc1.chaoxing.com/ananas/status/{_job['objectid']}?k={self.get_fid()}&flag=normal" _video_info = _session.get(_info_url).json() - _dtoken = _video_info["dtoken"] # 7d8349c683a65af92b68ed42b9eebfc1 + _dtoken = _video_info["dtoken"] _duration = _video_info["duration"] - _crc = _video_info["crc"] # 993fd31ba058895723016fa4fe9a6486 - _key = _video_info["key"] # 71980072a32dd57d151f7c3f6b3b122c + _crc = _video_info["crc"] + _key = _video_info["key"] _isPassed = False _isFinished = False _playingTime = 0 diff --git a/api/decode.py b/api/decode.py index 5664203..9c7f22f 100644 --- a/api/decode.py +++ b/api/decode.py @@ -57,13 +57,13 @@ def decode_course_card(_text: str): _job_list = [] if _cards: _job_info = {} - _job_info["ktoken"] = _cards["defaults"]["ktoken"] # 0754c189543882e328d711960117de81 - _job_info["mtEnc"] = _cards["defaults"]["mtEnc"] # 5a281a5c9819ae54f0b23bf97865133e + _job_info["ktoken"] = _cards["defaults"]["ktoken"] + _job_info["mtEnc"] = _cards["defaults"]["mtEnc"] _job_info["reportTimeInterval"] = _cards["defaults"]["reportTimeInterval"] # 60 - _job_info["defenc"] = _cards["defaults"]["defenc"] # 48a25584121db3161e429c9b0861b3da - _job_info["cardid"] = _cards["defaults"]["cardid"] # 690554045 - _job_info["cpi"] = _cards["defaults"]["cpi"] # 82923364 - _job_info["qnenc"] = _cards["defaults"]["qnenc"] # a60d09ee89bc30d264e09d24b77e3ada + _job_info["defenc"] = _cards["defaults"]["defenc"] + _job_info["cardid"] = _cards["defaults"]["cardid"] + _job_info["cpi"] = _cards["defaults"]["cpi"] + _job_info["qnenc"] = _cards["defaults"]["qnenc"] _job_info["ktoken"] = _cards["defaults"]["ktoken"] _job_info["ktoken"] = _cards["defaults"]["ktoken"] _job_info["ktoken"] = _cards["defaults"]["ktoken"]