SingleFile [1] can do that, i.e. automatically save viewed pages and/or bookmarks, but it will save pages in HTML. Alternatively, SingleFileZ [2] can do the same but will produce zip files (disguised as HTML files). Disclosure: I'm the author.
I'm using something similar I believe. I simply wrote a puppeteer automated browser to go through every page and saves it as `.mhtml`
This work quite well for my purpose. I was archiving a site with content that I pay for and sits behind my login.
I often use material from it when I'm offline and hence needed to put together this hack.
The below code does the job of saving the page as a single file.
I've been looking for something like this for a while now, to store all pages I visit into a personal archive, but all the options I found either involved setting up a proxy and MITMing all your requests (too much effort to set up) or saved to a format I could not easily access.
So far, SingleFile looks like a perfect fit, thanks!
The below code does the job of saving the page as a single file.
```
```