--save-page-as-mhtml
What does --save-page-as-mhtml do?
Enables saving webpages as MHTML (Webpage, Single) by default, instead of saving as HTML with a directory of sub-resources. (Webpage, Complete). See http://crbug.com/40179885 for how to remove this switch.
Usage
CLILaunch Chrome with --save-page-as-mhtml using CLI
chrome --save-page-as-mhtmlPuppeteerLaunch Chrome with --save-page-as-mhtml using Puppeteer
const browser = await puppeteer.launch({
args: ['--save-page-as-mhtml']
});PlaywrightLaunch Chrome with --save-page-as-mhtml using Playwright
const browser = await chromium.launch({
args: ['--save-page-as-mhtml']
});SeleniumLaunch Chrome with --save-page-as-mhtml using Selenium
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--save-page-as-mhtml')
driver = webdriver.Chrome(options=options)Build Conditions
ANDROID!(CHROMEOS)