const links = await page.$$eval('h1 > a', e=>e.map((a)=>a.href))
Β
Source: https://stackoverflow.com/questions/51280984/how-to-use-eval-function
pptr-promise-exmpl