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 fails to download video; no explanation #427

Closed
waucka opened this issue Sep 27, 2012 · 41 comments
Closed

youtube-dl fails to download video; no explanation #427

waucka opened this issue Sep 27, 2012 · 41 comments

Comments

@waucka
Copy link

@waucka waucka commented Sep 27, 2012

$ youtube-dl --version
2012.02.27
$ youtube-dl -v 'http://www.youtube.com/watch?v=7YeonrZUMHo'
[debug] Proxy map: {}
[youtube] Setting language
[youtube] 7YeonrZUMHo: Downloading video webpage
[youtube] 7YeonrZUMHo: Downloading video info webpage
[youtube] 7YeonrZUMHo: Extracting video information

ERROR: unable to download video

I can watch the video just fine in my browser, even if I'm not logged in to Youtube. youtube-dl downloads descriptions and .info.json files just fine.

@aksarkar
Copy link

@aksarkar aksarkar commented Sep 27, 2012

It's a 403 error. Most, but not all Youtube URLs I've tried today give this error now.

$ youtube-dl -g 'http://www.youtube.com/watch?v=7YeonrZUMHo' | xargs curl -I
HTTP/1.1 403 Forbidden
Last-Modified: Wed, 02 May 2007 10:26:10 GMT
Content-Type: text/plain
Connection: close
X-Content-Type-Options: nosniff
Date: Thu, 27 Sep 2012 03:46:34 GMT
Server: gvs 1.0
@wiserweb
Copy link

@wiserweb wiserweb commented Sep 27, 2012

Confirmed here as well.. Python 2.6.6, generic public videos won't download. Oh, and these things always occur when you've been searching for a solution all day, you finally find one, setup the server, update python, update the paths, and you bash your head for hours.. then finally since it's so recent Google hasn't picked this thread up, and you stumble here, somewhat relieved, somewhat disoriented by a full day gone by and no way to get that gratification that you 'got something working'. :)

@virtulis
Copy link
Contributor

@virtulis virtulis commented Sep 27, 2012

It seems that youtube now has a 'signature' request param. Modifying or removing that results in a 403. No idea where it comes from yet.

@kenrestivo
Copy link

@kenrestivo kenrestivo commented Sep 27, 2012

I just experienced this too. Something Bad has changed at Google, I think. Not good.

I was having the problem with a release from 2/12/2012 on Python 2.5, then tried with the latest youtbe-dl git commit on Python 2.7.3, same error.

@Zurd
Copy link

@Zurd Zurd commented Sep 27, 2012

Confirmed too. Debian Testing.

youtube-dl --version
2012.02.27

python --version
Python 2.7.3rc2

@wiserweb
Copy link

@wiserweb wiserweb commented Sep 27, 2012

The permanent fix for ALL content grabbers is a FireFox command line API, where after you navigate to a page you can pick from the cache what you'd like to keep, and download anything through the browser as a background service without the UI. - YouTube can always break a script, but the browser it has to respect.

@Zurd
Copy link

@Zurd Zurd commented Sep 27, 2012

That is a solution for one video at a time but youtube-dl provide the means to download all the videos of a user on youtube in one single command which is what I need.

@virtulis
Copy link
Contributor

@virtulis virtulis commented Sep 27, 2012

The 'signature' param is generated on server like everything else and is present in "url_encoded_fmt_stream_map" as "sig", among other things. Just get the url from "url_encoded_fmt_stream_map", change '&sig=' to '&signature=' and it's ready to use, unless I'm missing something.

@intarstudents
Copy link

@intarstudents intarstudents commented Sep 27, 2012

That doesn't seem to fix it @virtulis

@denisinla
Copy link

@denisinla denisinla commented Sep 27, 2012

I agree, still getting an error with that fix.

@virtulis
Copy link
Contributor

@virtulis virtulis commented Sep 27, 2012

Well it sure does for me. Did you recompile (or use youtube-dl.dev)?

@notEthan
Copy link

@notEthan notEthan commented Sep 27, 2012

@virtulis that fixed it for me; thanks

@vegagame
Copy link

@vegagame vegagame commented Sep 27, 2012

For me it's work, eg: ./youtube-dl.dev http://www.youtube.com/watch?v=djbR4DYHyV0

@Zurd
Copy link

@Zurd Zurd commented Sep 27, 2012

I don't understand, what is there to compile? youtube-dl is just a python file, can't I just modify this file?

@denisinla
Copy link

@denisinla denisinla commented Sep 27, 2012

@virtulis All is well now. Thanks !

@Tailszefox
Copy link
Contributor

@Tailszefox Tailszefox commented Sep 27, 2012

@virtulis Confirmed working for me as well, I couldn't download anything this morning and that fixed it. Thanks!

@Zurd The youtube-dl file is a ZIP file now, so changing it by hand is a bit less trivial than before. The easiest way to apply the fix yourself until the pull request is accepted is to clone the repository on your own file system, change the file according to the fix made by @virtulis, and recompile using "make". You'll get a new "youtube-dl" file that you can put somewhere where your $PATH will catch it, if you want it to replace the current version.

@krayon
Copy link

@krayon krayon commented Sep 27, 2012

@Zurd: it's "make compile" but other than that, yeah what @Tailszefox said. Quick work @virtulis , thanks :D

@Zurd
Copy link

@Zurd Zurd commented Sep 27, 2012

sudo apt-get install git
git clone https://github.com/rg3/youtube-dl.git
sudo apt-get install zip
nano youtube_dl/InfoExtractors.py (modify line 405)
make compile
./youtube-dl ...link...

Easy as pie! Confirmed working, thanks!

@virtulis
Copy link
Contributor

@virtulis virtulis commented Sep 27, 2012

@Zurd um, or you could just git clone https://github.com/virtulis/youtube-dl.git
I'm just sayin'

@nublaii
Copy link

@nublaii nublaii commented Sep 27, 2012

@virtulis Works like a charm! ;)

@phihag phihag closed this in 9ca6670 Sep 27, 2012
phihag added a commit that referenced this issue Sep 27, 2012
@Zurd
Copy link

@Zurd Zurd commented Sep 27, 2012

@virtulis ah I see the line 'referenced this issue from a commit in virtulis/youtube-dl', in any case, thanks!

@frikkasoft
Copy link

@frikkasoft frikkasoft commented Sep 27, 2012

I had the same problem, and after cloning the git repo everything works great again. Thanks all!

@phihag
Copy link
Contributor

@phihag phihag commented Sep 27, 2012

@frikkasoft You should now be able to just update youtube-dl since @virtulis 's change has been merged.

@acuity12
Copy link

@acuity12 acuity12 commented Sep 27, 2012

@virtulis you're awesome. I'm so stoked this community exists to jump on this problem just a couple hours after it happened. youtube-dl powers http://imgflip.com/gifgenerator and the URL function is back!

@krayon
Copy link

@krayon krayon commented Sep 27, 2012

@acuity12 That's a cool tool, and nice that it's powered with youtube-dl too. You should give youtube-dl credit on the site ;)

@cabetof
Copy link

@cabetof cabetof commented Sep 27, 2012

It's amazing the solution time. Thank you very much. In my case simply update:

xxx @ Multivac: ~ / Videos $ sudo youtube-dl -U
[sudo] password for xxx:
Updating to latest version ...
Updated youtube-dl. Restart youtube-dl to use the new version.
xxx @ Multivac: ~ / Videos $ youtube-dl --version
2012.09.27

And now everything works ... :)

@ChoHag
Copy link

@ChoHag ChoHag commented Oct 2, 2012

The first part of this bug, "youtube-dl fails to download video" has been fixed (for now...) but the second half, "no explanation", has not.

At the very least, youtube-dl knows that the reason for the error is 'HTTP 403', which it does not report:

ERROR: unable to download video

@pmdzlineur
Copy link

@pmdzlineur pmdzlineur commented Oct 10, 2012

su:
password
youtube-dl -U
was the solution for me.
Then youtube-dl thevideo
Nice feature :)

@akash0x53
Copy link

@akash0x53 akash0x53 commented Nov 13, 2012

sudo youtube-dl -U
update with latest stable release and then download your video

This works :)

@unaexpresion
Copy link

@unaexpresion unaexpresion commented Dec 5, 2012

exacto, prueben a actualizar la versión.... youtube-dl -U y listo!!

@puppypilgrim
Copy link

@puppypilgrim puppypilgrim commented Dec 10, 2012

As said above, I "sudo youtube-dl -U" which updates to the latest version, then used the command as usual and Youtube now works fine.

Thank you to all who made this happen.

Vancouver, Canada

@davidmcdavid
Copy link

@davidmcdavid davidmcdavid commented Dec 26, 2012

I got it from github (before reading about the -U option)

sudo apt-get install git
git clone https://github.com/rg3/youtube-dl.git
cd youtube-dl/
python -m youtube_dl <a_youtube_URL>

@atmelino
Copy link

@atmelino atmelino commented Feb 25, 2013

same here: before the upgrade, it did not work. After the upgrade, it worked
sudo youtube-dl -U

@awojnowski
Copy link
Contributor

@awojnowski awojnowski commented Apr 4, 2013

Has anyone experienced the signature being placed with the key "s", rather than "sig" within the fmt_stream_map? This seems to randomly occur with some users on an application of mine, and constructing the url using what appears to be the signature with the key "s" fails, even though "s" takes on the appearance of a completely valid signature.

@FiloSottile
Copy link
Collaborator

@FiloSottile FiloSottile commented Apr 4, 2013

@speedyapocalypse Umh... never seen anything like that, could you maybe provide a pcap, or a saved html?

@awojnowski
Copy link
Contributor

@awojnowski awojnowski commented Apr 4, 2013

I've put the HTML of the page in this Gist: https://gist.github.com/speedyapocalypse/5311690

Attached also is an example of one of the parsed "url dictionaries". It looks like you would simply use "s" instead of "sig", but this just flat out doesn't work and you receive a blank page.

Screen Shot 2013-04-04 at 11 03 58 AM

@tushar666
Copy link

@tushar666 tushar666 commented Sep 17, 2013

Failed extracting video URL using block due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa1b4940 {NSLocalizedDescription=Couldn't find the stream URL.}
2013-09-17 16:26:03.262 Go For[6699:c07] Failed loading video due to error:Error Domain=LBYouTubeExtractorErrorDomain Code=2 "Couldn't find the stream URL." UserInfo=0xa56e420 {NSLocalizedDescription=Couldn't find the stream URL.}

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Sep 17, 2013

@tushar666 if you are using LBYouTubeView, you must report its errors to them :https://github.com/larcus94/LBYouTubeView, we can't do anything

@aureooms
Copy link

@aureooms aureooms commented Aug 24, 2014

Still facing the same kind of problem, again only with a specific video

capture du 2014-08-24 04 07 23

@phihag
Copy link
Contributor

@phihag phihag commented Aug 24, 2014

@aureooms Can you pass in the -v option and report a new issue? This issue pertains to an ancient version of youtube-dl which you do not seem to have.

@aureooms
Copy link

@aureooms aureooms commented Aug 24, 2014

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
You can’t perform that action at this time.