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

I still get invalid URL for youtu.be links #142

Closed
fridakiriakos opened this issue Aug 7, 2011 · 5 comments
Closed

I still get invalid URL for youtu.be links #142

fridakiriakos opened this issue Aug 7, 2011 · 5 comments

Comments

@fridakiriakos
Copy link

Hello Everyone

I have downloaded the latest version of youtube-dl and I still get the same error for youtu.be links.

Here is the output I always get when downloading those links:
[frida@localhost youtube]$ python youtube-dl http://youtu.be/Rs6RefV1td4
WARNING: Falling back on generic information extractor.
[generic] Rs6RefV1td4: Downloading webpage
[generic] Rs6RefV1td4: Extracting information
ERROR: Invalid URL: http://youtu.be/Rs6RefV1td4

Thanks a lot.
Frida

@phihag
Copy link
Contributor

phihag commented Aug 7, 2011

youtu.be links are just 302s to the actual URL, i.e. they never worked. You'll notice that when you give youtube-dl the real URL as determined with

curl -Is http://youtu.be/Rs6RefV1td4 | sed -n 's#Location: ##p'

, you can plug the resulting URL into youtube-dl and it works. We should handle all 302 redirects in the generic IE.

@fridakiriakos
Copy link
Author

I have tried plugging the resulting URL into youtube-dl it did not work:

[frida@localhost youtube]$ curl -Is http://youtu.be/Rs6RefV1td4 | sed -n 's#Location: ##p'
http://www.youtube.com/watch?v=Rs6RefV1td4&feature=youtu.be

[frida@localhost youtube]$ python youtube-dl http://www.youtube.com/watch?v=Rs6RefV1td4&feature=youtu.be
[1] 21192
[frida@localhost youtube]$ [youtube] Setting language
[youtube] www.youtube.com/: Downloading video webpage
ERROR: unable to download video webpage: HTTP Error 404: Not Found

However we used to download youtu.be links all the time, this is the first time this happens, How did it work before? the generic IE also results in the invalid URL, Could you please advise me on how to solve this issue?
I would really appreciate it.

Thank you
Frida

@fridakiriakos
Copy link
Author

I am sorry, I have tried to do the above again and it worked, sorry for the inconvenience.

But I am still wondering how it worked before the Aug 4th.

Thanks a lot.

@phihag
Copy link
Contributor

phihag commented Aug 7, 2011

@fridakiriakos youtu.be links worked before because we did not treat them as generic redirects, but extracted the youtube ID. The above patch should fix it; alternatively, you can also use my fork of youtube-dl.

@fridakiriakos
Copy link
Author

thank you so much, both version work well :)

appreciate all your help.

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

3 participants