aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-26 02:31:16 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-26 02:31:16 +0700
commit590bc6f6a1cb513852a22f6db0ee36e9bd138f64 (patch)
treed87b1bb1312df54789c96868dd61ac10ba8205a7 /youtube_dl/__init__.py
parent51098426b83a8ebce4b0c08e869ce023232089fd (diff)
downloadyoutube-dl-590bc6f6a1cb513852a22f6db0ee36e9bd138f64.tar.xz
Use expand_path where appropriate (closes #12556)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 2f640607f..f15606568 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -16,7 +16,6 @@ from .options import (
parseOpts,
)
from .compat import (
- compat_expanduser,
compat_getpass,
compat_shlex_split,
workaround_optparse_bug9161,
@@ -26,6 +25,7 @@ from .utils import (
decodeOption,
DEFAULT_OUTTMPL,
DownloadError,
+ expand_path,
match_filter_func,
MaxDownloadsReached,
preferredencoding,
@@ -88,7 +88,7 @@ def _real_main(argv=None):
batchfd = sys.stdin
else:
batchfd = io.open(
- compat_expanduser(opts.batchfile),
+ expand_path(opts.batchfile),
'r', encoding='utf-8', errors='ignore')
batch_urls = read_batch_urls(batchfd)
if opts.verbose:
@@ -238,7 +238,7 @@ def _real_main(argv=None):
any_getting = opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat or opts.getduration or opts.dumpjson or opts.dump_single_json
any_printing = opts.print_json
- download_archive_fn = compat_expanduser(opts.download_archive) if opts.download_archive is not None else opts.download_archive
+ download_archive_fn = expand_path(opts.download_archive) if opts.download_archive is not None else opts.download_archive
# PostProcessors
postprocessors = []
@@ -449,7 +449,7 @@ def _real_main(argv=None):
try:
if opts.load_info_filename is not None:
- retcode = ydl.download_with_info_file(compat_expanduser(opts.load_info_filename))
+ retcode = ydl.download_with_info_file(expand_path(opts.load_info_filename))
else:
retcode = ydl.download(all_urls)
except MaxDownloadsReached: