1 parent 9689564 commit ba419ddCopy full SHA for ba419dd
1 file changed
AIMoocMain/main.py
@@ -150,6 +150,16 @@ def handle_resource(
150
self.logging.info(f"{prefix} ⏭ 跳过测验")
151
return
152
153
+ # 跳过子节点
154
+ if file_type == "子节点":
155
+ self.logging.info(f"{prefix} ⏭ 跳过无法展开的子节点")
156
+ return
157
+
158
+ # 跳过文件夹
159
+ if file_type == "文件夹":
160
+ self.logging.info(f"{prefix} ⏭ 跳过文件夹")
161
162
163
# 已完成的课程不再处理
164
if source_id in self.study_record_list:
165
self.logging.info(f"{prefix} ⏭ 跳过已完成的课程: {resource_name}")
@@ -185,7 +195,7 @@ def handle_resource(
185
195
course_info_id = node.get("courseInfoId")
186
196
study_time = total_num
187
197
188
- wait_time = random.randint(1, 2)
198
+ wait_time = round(random.uniform(0.5, 1.5), 2)
189
199
190
200
self.logging.info(
191
201
f"{prefix} ⏳ 学习数: {total_num},等待 {wait_time} 秒..."
0 commit comments