Created
June 15, 2021 13:50
-
-
Save leoleoasd/b3097797b167764a63f53db0ab42bc1a to your computer and use it in GitHub Desktop.
学习通题目批量导出
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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