Extraction: Rewrite item_extraction for better error handling and readability, rename extracted names for more consistency

This commit is contained in:
James Taylor
2019-12-18 19:39:16 -08:00
parent ee0a118a6c
commit 98777ee825
12 changed files with 304 additions and 339 deletions

View File

@@ -310,6 +310,8 @@ def uppercase_escape(s):
lambda m: chr(int(m.group(1), base=16)), s)
def prefix_url(url):
if url is None:
return None
url = url.lstrip('/') # some urls have // before them, which has a special meaning
return '/' + url