]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
Expanduser for more options with input files
authorSergey M․ <dstftw@gmail.com>
Sat, 7 May 2016 22:36:57 +0000 (04:36 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 7 May 2016 22:36:57 +0000 (04:36 +0600)
youtube_dl/YoutubeDL.py
youtube_dl/__init__.py

index 2187dcc8f6b850707e5d024fd94427cdc21fe536..a96482e68005d80f73704b727f01d45c62588200 100755 (executable)
@@ -2018,6 +2018,7 @@ class YoutubeDL(object):
         if opts_cookiefile is None:
             self.cookiejar = compat_cookiejar.CookieJar()
         else:
+            opts_cookiefile = compat_expanduser(opts_cookiefile)
             self.cookiejar = compat_cookiejar.MozillaCookieJar(
                 opts_cookiefile)
             if os.access(opts_cookiefile, os.R_OK):
index 7a0466077ae1e37682707ec0c29a753741769c85..cbd84c3af329b51a72eb235a40e102bdd83bde6d 100644 (file)
@@ -406,7 +406,7 @@ def _real_main(argv=None):
 
         try:
             if opts.load_info_filename is not None:
-                retcode = ydl.download_with_info_file(opts.load_info_filename)
+                retcode = ydl.download_with_info_file(compat_expanduser(opts.load_info_filename))
             else:
                 retcode = ydl.download(all_urls)
         except MaxDownloadsReached: