I want to scrape the Scratchpad from Khan academy but I don't know how to use the Scratchpad API.
I tried using articles and videos but it doesn't work.
Any ideas would be appreciated.
I want to scrape the Scratchpad from Khan academy but I don't know how to use the Scratchpad API.
I tried using articles and videos but it doesn't work.
Any ideas would be appreciated.
You can access the Khan Academy scratchpad API by using JSON. For example, to get the amount of votes in a program, you can use JSON like this:
$.getJSON("https://www.khanacademy.org/api/labs/scratchpads/" + programID + "&callback=?", function(data) {
console.log(data.sumVotesIncremented);
});
You can see what data you can collect here:
https://www.khanacademy.org/api/labs/scratchpads/6693037677641728 (or another id)