diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-24 17:31:33 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:28:45 +0100 |
commit | e0c982c8d0b0ca76482c6184ec3e749bbf566b6d (patch) | |
tree | e290f8c06e349674d74044d4a02abe76a383846c | |
parent | 331ce0a05d08f39f93d1568b37f3d3252c90b86e (diff) | |
download | youtube-dl-e0c982c8d0b0ca76482c6184ec3e749bbf566b6d.tar.xz |
Load cookies if the cookie file exists when starting the program
-rwxr-xr-x | youtube-dl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube-dl b/youtube-dl index e681e2d3f..2a51ef421 100755 --- a/youtube-dl +++ b/youtube-dl @@ -2190,6 +2190,8 @@ if __name__ == '__main__': else: try: jar = cookielib.MozillaCookieJar(opts.cookiefile) + if os.path.isfile(opts.cookiefile) and os.access(opts.cookiefile, os.R_OK): + jar.load() except (IOError, OSError), err: sys.exit(u'ERROR: unable to open cookie file') |