I'm monitoring a financial website which requires OTP and whatnot.
- My issue is, if the puppeteer script breaks, human intervention is required to get through the OTP/2FA again.
- Refreshing the page (
F5
) also causes the site to request for OTP/2FA again. Meaning, page content has to be restored as well, I can't just load a URL with cookies set.
Is there a way to restore/maintain that session in headless chrome when my script breaks/terminates or machine reboots and be able to resume from it?
After some googling, I found this, Puppeteer: how to store a session (including cookies, page state, local storage, etc) and continue later? but its terms are unfamiliar to me and I'm not certain if it is what I'm looking for.
Any ideas? Thank you.