SHARE
TWEET

Untitled

a guest Oct 21st, 2019 81 in 341 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.scrapeMlb=function(){var e=[];return document.querySelectorAll(".inningPlays>.active>.top>.play").forEach(n=>{let i=n.children[0].children[1].children[0].innerText,l=n.children[1].children[1].children[0].children[0].innerText.split(":")[1],r=[],c=[],h=[],t=n.children[2].children[0];for(let e=0;e<t.childElementCount;e++)r.push(t.children[e].children[1].children[0].children[0].innerText),c.push(t.children[e].children[1].children[0].children[1].innerText.split(" MPH ")[0]),h.push(t.children[e].children[1].children[0].children[1].innerText.split(" MPH ")[1]);for(let n=0;n<r.length;n++)e.push([`"${i}"`,`"${l}"`,`"${r[n]}"`,`"${c[n]}"`,`"${h[n]}"`])}),e},window.saveMlb=function(){let e=scrapeMlb(),n=[];e.forEach(function(e,i){var l=e.join(",");n.push(0==i?"data:text/csv;charset=utf-8,"+l:l)}),console.log("Click this: =>",encodeURI(n.join("\n"))),setTimeout(()=>{window.open(encodeURI(n.join("\n")))},1e3)},clear();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top