X-Git-Url: https://git.rapsys.eu/youtubedl/blobdiff_plain/1d3fd83f473663fce3e0a10303473a38d80cc3d0..abc36f0474141930338eef35e2444365fab932b6:/youtube_dl/utils.py diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index d293c74..2340bc3 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -39,6 +39,7 @@ from .compat import ( compat_basestring, compat_chr, compat_etree_fromstring, + compat_expanduser, compat_html_entities, compat_html_entities_html5, compat_http_client, @@ -539,6 +540,11 @@ def sanitized_Request(url, *args, **kwargs): return compat_urllib_request.Request(sanitize_url(url), *args, **kwargs) +def expand_path(s): + """Expand shell variables and ~""" + return os.path.expandvars(compat_expanduser(s)) + + def orderedSet(iterable): """ Remove all duplicates from the input iterable """ res = []