A simple python wrapper to Y2Z's monolith, a commandline program to download a webpage and bundle into a single HTML file.
Requires Python 3.7+ installed.
Works only on Linux at the moment.
pip install git+https://github.com/krishna2206/monolith-py.git#egg=monolith-py
Download a webpage
from monolithpy import Monolith
monolith_opts = {
"output": "monolith-github.html"
}
monolith = Monolith(monolith_opts)
monolith.download_webpage("https://github.com/Y2Z/monolith")
no_audio
(bool) : Exclude audio sourcesno_css
(bool) : Exclude CSScharset
(str) : Save document using custom charsetignore_network_errors
(bool) : Ignore network errorsomit_frames
(bool) : Omit framesno_webfonts
(bool) : Exclude web fontsno_javascript
(bool) : Exclude JavaScriptnoscript_contents
(bool) : Extract contents of NOSCRIPT elementsoutput
(str) : Write output to fileverbose
(bool) : Be quiettimeout
(int) : Adjust network request timeoutuser_agent
(str) : Provide custom User-Agentno_video
(bool) : Exclude videosno_image
(bool) : Remove images
-b
: Use custom base URL-I
: Isolate the document-k
: Accept invalid X.509 (TLS) certificates-M
: Don't add timestamp and URL information
- Support for Windows