In WeasyPrint’s public API I accept filenames (among other types) for the HTML inputs. Any filename that works with the built-in open() should work, but I need
open()
Does the following work for you?
from urlparse import urlparse, urlunparse urlunparse(urlparse('yourURL')._replace(scheme='file'))