Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie file error #5195

Closed
ghost opened this issue Mar 13, 2015 · 1 comment
Closed

Cookie file error #5195

ghost opened this issue Mar 13, 2015 · 1 comment

Comments

@ghost
Copy link

@ghost ghost commented Mar 13, 2015

test@test:~# youtube-dl -e --cookies "cookie.txt" --print-traffic "https://www.youtube.com/watch?v=s898ws_7VMQ"
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 403, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 370, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 329, in init
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1755, in _setup_opener
File "/usr/lib/python2.7/cookielib.py", line 1763, in load
self._really_load(f, filename, ignore_discard, ignore_expires)
File "/usr/lib/python2.7/_MozillaCookieJar.py", line 55, in _really_load
filename)
cookielib.LoadError: 'cookie.txt' does not look like a Netscape format cookies file

Cookie file source:

.youtube.com TRUE / FALSE 1428846439 VISITOR_INFO1_LIVE s0IqaYrSgOg
.youtube.com TRUE / FALSE 1428846439 YSC ujJ3n8Oe-Vw
.youtube.com TRUE / FALSE 1428846439 PREF f1
.youtube.com TRUE / FALSE 1428846439 goojf 0da5651fc58ad7dcba506892d2f4fdd6cwsAAABxSTNYbDBKSmJvQQ
.youtube.com TRUE / FALSE 1428846439 ACTIVITY 1426254424997

And in cookie file use only tabs.

Maybe add support for example: --cookie "VISITOR_INFO1_LIVE=s0IqaYrSgOg; YSC=ujJ3n8Oe-Vw" ?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Mar 13, 2015

Apparently it only works if you also add # Netscape HTTP Cookie File at the start of the file, closing as a duplicate of #4539.

@dstftw dstftw closed this Jan 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.