This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
from playwright.sync_api import sync_playwright | |
def save_mhtml(path: str, text: str): | |
with open(path, mode='w', encoding='UTF-8', newline='\n') as file: | |
file.write(text) | |
def save_page(url: str, path: str): | |
with sync_playwright() as playwright: | |
browser = playwright.chromium.launch(headless=False) |
# Unix (Terminal) | |
open -a "Google Chrome" --args --disable-gpu-vsync --disable-frame-rate-limit | |
# Windows (Command prompt) | |
start chrome --args --disable-gpu-vsync --disable-frame-rate-limit |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
From: Salmon of Doubt by Douglas Adams
There’s always a moment when you start to fall out of love, whether it’s with a person or an idea or a cause, even if it’s one you only narrate to yourself years after the event: a tiny thing, a wrong word, a false note, which means that things can never be quite the same again. For me it was hearing a stand-up comedian make the following observation: “These scientists, eh? They’re so stupid! You know those black-box flight recorders they put on aeroplanes? And you know they’re meant to be indestructible?
It’s always the thing that doesn’t get smashed? So why don’t they make the planes out of the same stuff?” The audience roared with laughter at how stupid scientists were, couldn’t think their way out of a paper bag, but I sat feeling uncomfortable. Was I just being pedantic to feel that the joke didn’t really work because flight recorders are made out of titanium and that if you made planes out of titanium rather than aluminium, they’d be far too heavy to get off the