Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
youtube-dl dumps wrong URL for YouTube videos #2499
Comments
|
How are you calling the script? |
|
The script works fine for me from the US. Can you define Does the problem occur when you use youtube-dl's built-in downloader, i.e. do not pass in Can you reproduce the problem with http://www.youtube.com/watch?v=BaW_jenozKc ? |
|
I have added
it downloads https://www.youtube.com/watch?v=J0-rgeU1E4w My /bin/sh version is:
This script works fine: #!/bin/sh
BAREURL="$( youtube-dl -g "$1")"
wget "$BAREURL"
exit@phihag Maybe we should disable the automic search by default and let it fail. |
|
Calling the aforementioned script 'test.sh' and performing
will result in downloading the YouTube video https://www.youtube.com/watch?v=5mPDhmP6ztQ. The URL youtube-dl spits out is: The same behaviour happens on the test file at http://www.youtube.com/watch?v=BaW_jenozKc : youtube-dl spits out a googlevideo URL that points to another video (the same damn "TrapDoor" video at https://www.youtube.com/watch?v=5mPDhmP6ztQ). In comparison, performing
will download the correct video (https://www.youtube.com/watch?v=yrBrH5PZtcc - "Opeth- Demon of the Fall-yrBrH5PZtcc.mp4"). Motivated by an earlier youtube-dl issue, I've tried removing ~/.config/youtube-dl/. It did not change the behaviour. The strace is non-distinct... |
|
Forgot to mention that this is intermittent. Here is the verbose info you requested. Nothing fishy happening when youtube-dl handles the download itself.
Hmmm.... maybe there is something strange with my machine. (Or maybe YouTube is playing with me?) Forgoing the script seems to work at the moment:
seems to correctly download the test file. And the first example from my last post appears to work now too:
|
|
I'm not sure what the issue is, but I seem to be the only one having it. I'll close for now and open again when (if) I can get a better handle on it. |
Description
youtube-dl will properly download YouTube videos, but the [-g] option spits out URLs to different videos. Wget, cURL, and mplayer download the wrong video. Behaviour does not vary when changing user-agent in any four (or any combination of the four) programs.
Most youtube links will result in the same video being downloaded (https://www.youtube.com/watch?v=5mPDhmP6ztQ). Behaviour happens across several machines (32 and 64 bit) at different addresses.
Minimal test program
Machine and Version info
youtube-dl version: 2014.02.25
OS: Arch Linux
uname: Linux XXX 3.12.8-1-ARCH #1 SMP PREEMPT Thu Jan 16 09:46:30 CET 2014 i686 GNU/Linux
glibc version: glibc
Python version: 3.3.3
Country: Canada