Skip to content

Instantly share code, notes, and snippets.

@leoleoasd
Created June 15, 2021 13:50
Show Gist options
  • Save leoleoasd/b3097797b167764a63f53db0ab42bc1a to your computer and use it in GitHub Desktop.
Save leoleoasd/b3097797b167764a63f53db0ab42bc1a to your computer and use it in GitHub Desktop.
学习通题目批量导出
for(let i of $("div.TiMu").toArray()){
question = i.querySelector("p").innerText;
answers = Array.from(i.querySelectorAll("li")).map(v => v.innerText.replace("\n\n", ""));
correct = i.querySelector(".Py_answer span").innerText;
q.push({question, answers, correct})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment