From: Ricardo Garcia Date: Sun, 24 Oct 2010 15:31:33 +0000 (+0200) Subject: Load cookies if the cookie file exists when starting the program X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=e0c982c8d0b0ca76482c6184ec3e749bbf566b6d;p=youtube-dl Load cookies if the cookie file exists when starting the program --- 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')