about summary refs log tree commit diff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorKevin Deldycke <kevin@deldycke.com>2016-05-07 20:03:25 +0200
committerKevin Deldycke <kevin@deldycke.com>2016-05-07 20:03:25 +0200
commite2eca6f65e9969c31b3374bd3688321f3e471cd7 (patch)
tree3121d962da6485a1688d01fea213d4b565d6f92b /youtube_dl/__init__.py
parenta0904c5d8024c12b7f95b1126a6b8152a4e1021f (diff)
downloadyoutube-dl-e2eca6f65e9969c31b3374bd3688321f3e471cd7.tar.gz
youtube-dl-e2eca6f65e9969c31b3374bd3688321f3e471cd7.tar.xz
youtube-dl-e2eca6f65e9969c31b3374bd3688321f3e471cd7.zip
Expand user's home in batch file path.
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 737f6545d..7a0466077 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -86,7 +86,9 @@ def _real_main(argv=None):
             if opts.batchfile == '-':
                 batchfd = sys.stdin
             else:
-                batchfd = io.open(opts.batchfile, 'r', encoding='utf-8', errors='ignore')
+                batchfd = io.open(
+                    compat_expanduser(opts.batchfile),
+                    'r', encoding='utf-8', errors='ignore')
             batch_urls = read_batch_urls(batchfd)
             if opts.verbose:
                 write_string('[debug] Batch file urls: ' + repr(batch_urls) + '\n')