Load cookies if the cookie file exists when starting the program
authorRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 24 Oct 2010 15:31:33 +0000 (17:31 +0200)
committerRicardo Garcia <sarbalap+freshmeat@gmail.com>
Sun, 31 Oct 2010 10:28:45 +0000 (11:28 +0100)
youtube-dl

index e681e2d3fde5a7737b28e56007ef535890541846..2a51ef4212c9ca80f0bd169e1931de72836b97ba 100755 (executable)
@@ -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')