Y2Z / monolith

⬛️ CLI tool for saving complete web pages as a single HTML file
https://crates.io/crates/monolith
Creative Commons Zero v1.0 Universal
10.97k stars 316 forks source link

Example of a page that doesn't work #19

Open dandavison opened 5 years ago

dandavison commented 5 years ago

http://acko.net/blog/how-to-fold-a-julia-fractal/ doesn't seem to work. On loading the monolith output I see errors like this in chrome:

image image

In Firefox I see

image
snshn commented 5 years ago

Thank you for the report. I was able to save and open the page in both Chrome and FF, both with JS on and off (-j). When JS is on it attempts to access some resource it apparently doesn't have access to due to some security policy. The static content of the page is viewable, but since it's a heavily JS-based page, I'll need to resolve the issue with embedded JS not working properly before it can fully function after being converted into a single HTML file.

mrzv commented 3 years ago

Probably related to this issue, monolith-saved pages don't render Nicky Case's explorable explanations correctly. Just as an example: https://ncase.me/trust/

snshn commented 3 years ago

Hi there @mrzv!

I was able to save https://ncase.me/trust/ with monolith https://ncase.me/trust/ -b https://ncase.me/trust/ > /tmp/test.html but I don't think that .html file will work fine while you're offline, since it seems to pull some remote .js assets.

mrzv commented 3 years ago

Ah, the -b flag does the trick, at least when online; without it, the page didn't work even online. I didn't know about it. Too bad that fully offline is not an option.

Another example worth investigating are substack posts. When you save any one and then open it, the content flashes briefly and then disappears (surely as a result of some javascript).

snshn commented 3 years ago

Fully offline could be possibly achieved with Monolith browser extension: https://chrome.google.com/webstore/detail/monolith/koalogomkahjlabefiglodpnhhkokekg If not, then perhaps SingleFile could do it.

I'll take a look at substack, thank you; -j usually solves the problem, since some pages show JS-powered lightboxes or redirect somewhere else, without JS even Cookie prompts usually never get shown.

mrzv commented 3 years ago

Actually, fully offline seems to just work for that link, unless I'm hitting some browser cache.

mrzv commented 3 years ago

And -j does the trick with substack. Thanks!