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

youtube-dl cookie problem #273

Closed
rubiohiguey opened this issue Jan 14, 2012 · 1 comment
Closed

youtube-dl cookie problem #273

rubiohiguey opened this issue Jan 14, 2012 · 1 comment

Comments

@rubiohiguey
Copy link

@rubiohiguey rubiohiguey commented Jan 14, 2012

Hello

I am just a basic linux CL user.

I have been using youtube-dl for a long time, thank you guys for this great piece of script.

I have now tried to use youtube-dl with cookies.

I nee dto simulate a different country for youtube download. So far I have used other scripts to find complete URL and then I used wget with --header option to download it. It was cumbersome though. Then I found out youtube-dl allows using cookie file.

So I have this cookie file (cookie.txt) which has content: VISITOR_INFO1_LIVE=kVOjAYmlXSE
I run: youtube.dl --cookies cookie.txt http://www.youtube.com/videourl
but i get error "ERROR: unable to open cookie file"

I tried chmod 777 for cookie.txt, I tried putting a full path to the cookie.txt file, copying cookie.txt to /usr/bin
trying everything and I always get error unable to open cookie file.

What am I doing wrong?

Thank you,
George

@phihag
Copy link
Contributor

@phihag phihag commented Feb 26, 2012

Hi George, sorry for the late answer, but here it goes: Like any other command, youtube-dl expects filenames to be relative to the current working directory or absolute. To clarify, if you're currently in the directory /home/george/ytdownloads, and your cookie.txt is in /home/george/Desktop/cookie.txt, the following will work:

youtube-dl ../Desktop/cookie.txt videourl # Relative URL

youtube-dl /home/george/Desktop/cookie.txt videourl # Absolute URL

youtube-dl ~/Desktop/cookie.txt videourl # Absolute URL with substitute for HOME

cd ../Desktop # change the current working directory
youtube-dl cookie.txt videourl

By the way 0777 is definitely the wrong mode. You want u+w,a+r, or 0644. I'm closing this issue for now, but I'm anxious to hear whether that worked or not, so feel free to comment. Since I'm currently writing my Master's thesis, the reaction may be delayed, but I promise I'll read and answer everything eventually.

@phihag phihag closed this Feb 26, 2012
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.