Skip to content

Instantly share code, notes, and snippets.

@f
Created March 31, 2019 20:47
Show Gist options
  • Save f/c9bde240ec2d5c1b3c1e6625aea4be25 to your computer and use it in GitHub Desktop.
Save f/c9bde240ec2d5c1b3c1e6625aea4be25 to your computer and use it in GitHub Desktop.
setInterval(()=>fetch("http://secim.aa.com.tr/Handlers/IlBelediyeBaskanligi.ashx").then(x=>x.json()).then(x=>x.AA.IlSonuclari["Il"].find(x=>x.Kod=='34').PartiSonuclari.Parti.filter(x=>['7','8'].includes(x.Kod)).map(x=>x.Oy).map(x=>parseInt(x)).reduce((x,y)=>x-y)).then(x=>console.log(Math.abs(x))),1e3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment