diff options
Diffstat (limited to 'crocoite/util.py')
-rw-r--r-- | crocoite/util.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crocoite/util.py b/crocoite/util.py index ded5e99..da377a3 100644 --- a/crocoite/util.py +++ b/crocoite/util.py @@ -26,6 +26,8 @@ import random, sys, platform, os, json, urllib from datetime import datetime import hashlib, pkg_resources +from yarl import URL + class StrJsonEncoder (json.JSONEncoder): """ JSON encoder that turns unknown classes into a string and thus never fails """ @@ -39,12 +41,6 @@ class StrJsonEncoder (json.JSONEncoder): except TypeError: return str (obj) -def packageUrl (path): - """ - Create URL for package data stored into WARC - """ - return 'urn:' + __package__ + ':' + urllib.parse.quote (path) - async def getFormattedViewportMetrics (tab): layoutMetrics = await tab.Page.getLayoutMetrics () # XXX: I’m not entirely sure which one we should use here |