jaimeMF / youtube-dl-api-server

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

Just get first video of a playlist #7

Closed donnguyen closed 10 years ago

donnguyen commented 10 years ago

Hi, I deployed this app to GAE, it's working fine but somethings wrong while trying to get links of a playlist (youtube)

http://since....appspot.com/api/?url=http://www.youtube.com/watch?v=CAP-Xj4Fz18&list=FLm7zmYIDWXpE5aIuXLYlpvA

You can try my deployment by the url above. It returns first video of playlist only. It's weird!! I know since your deployment at:

http://youtube-dl.appspot.com/api/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCAP-Xj4Fz18%26list%3DFLm7zmYIDWXpE5aIuXLYlpvA

is working fine. Could you have a look and tell me the reason? Thank you very much! :+1:

donnguyen commented 10 years ago

Oh, I just tried:

http://sinc.appspot.com/api/?url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DCAP-Xj4Fz18%26list%3DFLm7zmYIDWXpE5aIuXLYlpvA

My gosh, I don't know why!! :|

jaimeMF commented 10 years ago

The problem is that you have to escape the url (as you did in the second url). Otherwise when processing the request, it actually gets two arguments:

{
  'url': 'http://www.youtube.com/watch?v=CAP-Xj4Fz18',
  'list': 'FLm7zmYIDWXpE5aIuXLYlpvA',
}
donnguyen commented 10 years ago

Thank you, it works fine! Great job!