mirror of
https://github.com/blackjack4494/yt-dlc.git
synced 2024-12-23 00:07:49 +00:00
Load cookies if the cookie file exists when starting the program
This commit is contained in:
parent
331ce0a05d
commit
e0c982c8d0
1 changed files with 2 additions and 0 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Reference in a new issue