Bittle

Extractor.js

Oct 30th, 2017
177
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  //Extract info from http://www.soomolearning.com/ online textbook
  2. var q = $(".multiple-choice-question-element");
  3. var all = "";
  4. q.each(function(i, val){
  5.   var body = q.eq(i).find(".question-body");
  6.   var ans = q.eq(i).find(".rejoinder");
  7.   ans.find("span").remove();
  8.  
  9.   all = all+("■ "+body.text()+"\n=>"+ans.text()+"\n\n");
  10. });
  11.  
  12. // showtips
  13. var q = $(".showtip");
  14. q.each(function(i, val){
  15.  
  16.   all = all+("* "+$(val).attr("aria-label")+"\n\n");
  17. });
  18.  
  19. console.log(all);
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment