Skip to content

Instantly share code, notes, and snippets.

@blaadje
Created December 1, 2019 12:43
Show Gist options
  • Save blaadje/df46dc23048b5fa3de32d710a22cd56b to your computer and use it in GitHub Desktop.
Save blaadje/df46dc23048b5fa3de32d710a22cd56b to your computer and use it in GitHub Desktop.
const time_step=100,wait=(e=1)=>new Promise(c=>setTimeout(c,e)),click=async e=>(document.querySelector(e).click(),wait(100)),explore=async()=>click(".recCard__info").then(()=>document.querySelector(".bullet")&&Array.from(document.querySelector(".bullet")).reduce((e,c)=>e.then(()=>(c&&c.click(),wait(100))),Promise.resolve())).then(()=>click('[aria-label="Like"]')).then(()=>explore());explore();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment