jaimeMF / youtube-dl-api-server

A youtube-dl REST API server
https://youtube-dl-api-server.readthedocs.org/
The Unlicense
364 stars 212 forks source link

youtube seems not to work anymore. #3

Closed geweb7 closed 11 years ago

geweb7 commented 11 years ago

youtube-dl-api-server gives video info with urls but we can't download video by those urls. Youtube.com answers with 403

jaimeMF commented 11 years ago

Are you doing the calls to youtube-dl.appspot.com or to a custom server? The first one doesn't give working urls for youtube, and there's nothing I can do. But you can deploy your own server and get the correct urls (if you download them on the same network.

geweb7 commented 11 years ago

I used youtube-dl.appspot.com and youtube-dl on my server. Right, the problem is with diffrent network. I mean the url works on my local server (the same ip), but it doesn't work on remote server (visitor and server are on different ips). So we can't make web service for visitors to download files from youtube anymore, can we?

jaimeMF commented 11 years ago

No, but it has never worked for me. Did you ever get it to work?

geweb7 commented 11 years ago

No, I ddn't use this app before, I just tried it today. But I thought it worked earlier because there is big amount of code devoted to youtube in InfoExtractors.py. I wnated to let my users download files from youtube. So there is no possibility to convert video links and give them right direct urls on my site? Any thoughts would be appreciated.

jaimeMF commented 11 years ago

You have confussed some things:

jaimeMF commented 11 years ago

One method that will work is to download the videos in your server and then give the user a link to the file in your server.

geweb7 commented 11 years ago

I see. Downloading videos to my server isn't the option. Thank you anyway.

douglascorrea commented 11 years ago

Hi JaimeMF,

I found a way not storing video on server, but just making a kind of "proxy" reading from youtube url and flushing it to response directly.

I made an app on GAE using gae-boilerplate and youtube-dl just to test this idea and it works!

http://youtube-to-itunes-podcast.appspot.com/ytip/?youtube_url=http://www.youtube.com/channel/UCX2-rVf0umMBIB7dLMn5LKg

Where youtube_url is the CHANNEL url that you whant to transform in iTunes Podcast Feed.

It will return an RSS feed that can be fetched by itunes. And there you can download the videos using itag18.

Each item url on "<enclosure url=" actually is a "shortner" of youtube mp4 file url, when user go to that URL I read from youtube and flush to response directly.

There is a few limitations still, because I´m using GAE and it´s have 20M/minute fetching limitation and others, but I will change the code to works on any server.

I will put the code in github soon

jaimeMF commented 11 years ago

Thanks, I'll probably not implement it since it would quickly surpass the GAE limits, but I'd like to see your code.

douglascorrea commented 11 years ago

Hi Jaime, I share my repo with you. As I´m in very beginning I prefer to keep it private for while

rubenods2 commented 11 years ago

Very interested in your solution Douglas

stnguyen commented 10 years ago

any update on this please? :)

jaimeMF commented 10 years ago

@stnguyen I can watch the YouTube videos now, I guess they changed something.