From e0c982c8d0b0ca76482c6184ec3e749bbf566b6d Mon Sep 17 00:00:00 2001 From: Ricardo Garcia Date: Sun, 24 Oct 2010 17:31:33 +0200 Subject: [PATCH] Load cookies if the cookie file exists when starting the program --- youtube-dl | 2 ++ 1 file changed, 2 insertions(+) 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')