aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2020-04-27 18:02:55 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2020-04-27 18:02:55 +0100
commita2e7403d38323d8ca5d747103c0f61db4cbe0b36 (patch)
treefb6edfc1158cdcc6cd3731e4ea27b6388b6ee343
parentupgrade travis distribution (diff)
parentcode formatting (diff)
downloadpaper2remarkable-a2e7403d38323d8ca5d747103c0f61db4cbe0b36.tar.gz
paper2remarkable-a2e7403d38323d8ca5d747103c0f61db4cbe0b36.zip
Merge branch 'master' into bugfix/html-images
-rw-r--r--paper2remarkable/providers/html.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paper2remarkable/providers/html.py b/paper2remarkable/providers/html.py
index ba250e7..9f8394c 100644
--- a/paper2remarkable/providers/html.py
+++ b/paper2remarkable/providers/html.py
@@ -48,7 +48,7 @@ code { font-family: 'Inconsolata'; font-size: .7rem; background: #efefef; }
"""
-def my_fetcher(url):
+def url_fetcher(url):
if url.startswith("//"):
url = "https:" + url
elif url.startswith("file:///"):
@@ -128,7 +128,7 @@ class HTML(Provider):
fp.write(html_article)
font_config = weasyprint.fonts.FontConfiguration()
- html = weasyprint.HTML(string=html_article, url_fetcher=my_fetcher)
+ html = weasyprint.HTML(string=html_article, url_fetcher=url_fetcher)
css = weasyprint.CSS(string=CSS, font_config=font_config)
html.write_pdf(filename, stylesheets=[css], font_config=font_config)