浏览代码

Load cookies if the cookie file exists when starting the program

Ricardo Garcia 15 年之前
父节点
当前提交
e0c982c8d0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      youtube-dl

+ 2 - 0
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')