SHARE
TWEET

Untitled

a guest Oct 21st, 2019 94 in 337 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>section>.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],c=[],r=[],h=[],t=n.children[2].children[0];for(let e=0;e<t.childElementCount;e++)c.push(t.children[e].children[1].children[0].children[0].innerText),r.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<c.length;n++)e.push([`"${i}"`,`"${l}"`,`"${c[n]}"`,`"${r[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