Now that i have puppeteer working, it is extremely slow

const browser = await puppeteer.launch({
      args: ['--no-sandbox']
    });
    
    const page2 = await browser.newPage();
    console.log(2)
    //set cookies
    let time = new Date().getTime()
    await page2.setCookie({ name: ".ASPXAUTH", value: request.cookies[".ASPXAUTH"], domain: "activestudent.tupeloschools.com", path: "/", expires: -1, size: request.cookies[".ASPXAUTH"].length + 9, httpOnly: true, secure: false, session: true, sameSite: "Lax" });
    await page2.setCookie({ name: "ASP.NET_SessionId", value: request.cookies["ASP.NET_SessionId"], domain: "activestudent.tupeloschools.com", path: "/", expires: -1, size: request.cookies["ASP.NET_SessionId"].length + 17, httpOnly: true, secure: false, session: true, sameSite: "Lax" });

    
    console.log(new Date().getTime() - time)
    
    console.log(2)
    await page2.goto('');
    console.log(3)
    await page2.click("#ctl00_PageData_txtStartDate", {clickCount: 3})
    await page2.type('#ctl00_PageData_txtStartDate', date);
    await page2.click("#ctl00_PageData_cmdGetNewsDate");
    await page2.waitForNavigation();
    let html = await page2.content()

So i implemented a couple lines to see how long it takes to set cookies, it takes anywhere from 8-16 seconds JUST to set the cookies. and then the actual actions taken on the site take around 10. that uses up the 30 seconds till it shuts down really really fast.

any way I can speed this up?

(Yes i know i call setcookie twice) i should probably change it

unrelated: wasn’t Glitch opposed to users running headless browsers? ~~vague link: https://support.glitch.com/t/unsuspended-project-has-been-suspended-again/11569/2~~

oops better link Project Glitch suspended for "No miners allowed" - #4 by cori

They have an example project with garret in it so I think they still allow it