Skip to content

Commit

Permalink
fix(script): 修复上个版本智慧职教MOOC学院中作业自动答题题目为空的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
enncy committed Apr 24, 2023
1 parent 6969b52 commit e095493
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/scripts/src/projects/icve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ function work({ answererWrappers, period, thread }: CommonWorkOptions) {
.filter((t) => t?.innerText)
.map((t) => {
if (t) {
return t.childNodes[2].textContent?.replace(/^、/, '') || '';
const title = t.cloneNode(true) as HTMLElement;
title.querySelector('[name*="questionIndex"]')?.remove();
title.querySelector('.q_score')?.remove();
return title.innerText.trim().replace(/^、/, '') || '';
}
return '';
})
Expand Down

0 comments on commit e095493

Please sign in to comment.