How to save web page content as mp4 using puppeteer in nodejs

  javascript, node.js, puppeteer

Is there a way to download mp4 or video files using puppeteer?
Here’s an example of what I want to download

Here’s my script so far

async downloadVideo(link = '') {
    try {
        this.browser = await puppeteer.launch({
            headless: false,
            args: ['--no-sandbox']
        }) = await this.browser.newPage();

        if (!link) {
            throw new Error(`No link provided, process skipped`);

        await, { waitUntil: 'load', timeout: 60000 })

    catch (error) {
        throw error;

Source: Ask Javascript Questions