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

-g option for YouTube is not working anymore #41

Closed
tom87 opened this issue Dec 11, 2010 · 2 comments
Closed

-g option for YouTube is not working anymore #41

tom87 opened this issue Dec 11, 2010 · 2 comments

Comments

@tom87
Copy link

tom87 commented Dec 11, 2010

Since the change on YouTube on 9-12-2010 the returned download url doesn't work.
I get a HTML "Forbidden"

@rg3
Copy link
Collaborator

rg3 commented Dec 11, 2010

The option IS working and returning the video URL that YouTube is providing (notice that get_video is now a 404). However, if you want to use it to download the video, you may have to combine it with the --cookies option.

@rg3
Copy link
Collaborator

rg3 commented Dec 11, 2010

I just wanted to share the bourne shell function that I use to have a "yt" command available to watch videos while not using the web browser. It looks like this:

yt () 
{ 
    cookiefile="/tmp/cookies-$( date +%s.%N ).txt";
    url=$( youtube-dl --cookies $cookiefile -g "$@" );
    mplayer -cookies -cookies-file $cookiefile $url;
    rm -f $cookiefile
}

Then, I can use something like:

yt 'http://www.youtube.com/watch?v=lm-Vnx58UYo'

And watch the video using mplayer.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants