diff options
author | James Taylor <user234683@users.noreply.github.com> | 2019-12-18 19:39:16 -0800 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2019-12-18 19:39:16 -0800 |
commit | 98777ee82561ae205f156a7f8497728aecfa080c (patch) | |
tree | aaaf3e82dcdac00abda588b6cfb15e5382a49cd0 /youtube/util.py | |
parent | ee0a118a6c7ed0e371fed18dcdace1f18a3cabf6 (diff) | |
download | yt-local-98777ee82561ae205f156a7f8497728aecfa080c.tar.lz yt-local-98777ee82561ae205f156a7f8497728aecfa080c.tar.xz yt-local-98777ee82561ae205f156a7f8497728aecfa080c.zip |
Extraction: Rewrite item_extraction for better error handling and readability, rename extracted names for more consistency
Diffstat (limited to 'youtube/util.py')
-rw-r--r-- | youtube/util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube/util.py b/youtube/util.py index 474e7b5..9023b98 100644 --- a/youtube/util.py +++ b/youtube/util.py @@ -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 |