Skip to content

Instantly share code, notes, and snippets.

@mojimi
mojimi / weasyprint-async.py
Last active Jun 15, 2020
WeasyPrint Async Images/asyncio
View weasyprint-async.py
import aiohttp
import asyncio
import base64
import time
from io import BytesIO
from PIL import Image
from bs4 import BeautifulSoup
from weasyprint import HTML
html_with_images = """
You can’t perform that action at this time.