I've been created a project for youtube scraping on puppeteer, you can take a look at this line, this is exactly what are you looking for Yomen:YoutubeBot.ts:21